mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
virfilemock: Init symbols in canonicalize_file_name()
If a program that is using this mock calls canonicalize_file_name() as the very first function then it will face SIGSEGV because real_canonicalize_file_name is uninitialized. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1ec3e39742
commit
dd5ae5f240
@ -177,6 +177,9 @@ statfs(const char *path, struct statfs *buf)
|
|||||||
char *
|
char *
|
||||||
canonicalize_file_name(const char *path)
|
canonicalize_file_name(const char *path)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
init_syms();
|
||||||
|
|
||||||
if (getenv("LIBVIRT_MTAB")) {
|
if (getenv("LIBVIRT_MTAB")) {
|
||||||
const char *p;
|
const char *p;
|
||||||
char *ret;
|
char *ret;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user