1
0
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:
Ján Tomko 2014-07-07 08:18:44 +02:00
parent 14f71959b6
commit f1e192e92e
2 changed files with 5 additions and 0 deletions

View File

@ -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);

View File

@ -1068,6 +1068,9 @@ doRemoteOpen(virConnectPtr conn,
VIR_FREE(pkipath);
VIR_FREE(knownHostsVerify);
VIR_FREE(knownHosts);
#ifndef WIN32
VIR_FREE(daemonPath);
#endif
return retcode;