mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 23:25:24 +00:00
Fix leak build config file path
* src/libvirt.c: Free user directory path
This commit is contained in:
parent
a8bb75a3e6
commit
87e8ff1be1
@ -974,9 +974,12 @@ virConnectConfigFile(void)
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (virAsprintf(&path, "%s/.libvirt/libvirt.conf",
|
if (virAsprintf(&path, "%s/.libvirt/libvirt.conf",
|
||||||
userdir) < 0)
|
userdir) < 0) {
|
||||||
|
VIR_FREE(userdir);
|
||||||
goto no_memory;
|
goto no_memory;
|
||||||
}
|
}
|
||||||
|
VIR_FREE(userdir);
|
||||||
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user