mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 18:03:50 +03: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)
|
||||
goto error;
|
||||
|
||||
VIR_FREE(daemonPath);
|
||||
VIR_FREE(lockdpath);
|
||||
|
||||
return client;
|
||||
|
||||
error:
|
||||
VIR_FREE(daemonPath);
|
||||
VIR_FREE(lockdpath);
|
||||
virNetClientClose(client);
|
||||
virObjectUnref(client);
|
||||
|
@ -1068,6 +1068,9 @@ doRemoteOpen(virConnectPtr conn,
|
||||
VIR_FREE(pkipath);
|
||||
VIR_FREE(knownHostsVerify);
|
||||
VIR_FREE(knownHosts);
|
||||
#ifndef WIN32
|
||||
VIR_FREE(daemonPath);
|
||||
#endif
|
||||
|
||||
return retcode;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user