rpc: Need to virCommandFree on error path

This commit is contained in:
John Ferlan 2013-01-30 10:05:24 -05:00
parent ce6de782e9
commit 0ea43d177c

View File

@ -704,6 +704,7 @@ int virNetSocketNewConnectSSH(const char *nodename,
virBufferEscapeShell(&buf, netcat);
if (virBufferError(&buf)) {
virCommandFree(cmd);
virBufferFreeAndReset(&buf);
virReportOOMError();
return -1;