mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Free the return value of virFileFindResource
Commits e18a80a and 57e5c3c switched from a getenv wrapper which does not allocate a string to virFileFindResource which does not, without freeing it. https://bugzilla.redhat.com/show_bug.cgi?id=1116427
This commit is contained in:
parent
14f71959b6
commit
f1e192e92e
@ -273,11 +273,13 @@ static virNetClientPtr virLockManagerLockDaemonConnectionNew(bool privileged,
|
|||||||
if (virNetClientAddProgram(client, *prog) < 0)
|
if (virNetClientAddProgram(client, *prog) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
VIR_FREE(daemonPath);
|
||||||
VIR_FREE(lockdpath);
|
VIR_FREE(lockdpath);
|
||||||
|
|
||||||
return client;
|
return client;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
VIR_FREE(daemonPath);
|
||||||
VIR_FREE(lockdpath);
|
VIR_FREE(lockdpath);
|
||||||
virNetClientClose(client);
|
virNetClientClose(client);
|
||||||
virObjectUnref(client);
|
virObjectUnref(client);
|
||||||
|
@ -1068,6 +1068,9 @@ doRemoteOpen(virConnectPtr conn,
|
|||||||
VIR_FREE(pkipath);
|
VIR_FREE(pkipath);
|
||||||
VIR_FREE(knownHostsVerify);
|
VIR_FREE(knownHostsVerify);
|
||||||
VIR_FREE(knownHosts);
|
VIR_FREE(knownHosts);
|
||||||
|
#ifndef WIN32
|
||||||
|
VIR_FREE(daemonPath);
|
||||||
|
#endif
|
||||||
|
|
||||||
return retcode;
|
return retcode;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user