提交 f1e192e9 编写于 作者: J Ján Tomko

Free the return value of virFileFindResource

Commits e18a80a3 and 57e5c3c2 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
上级 14f71959
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册