mirror of https://gitee.com/openkylin/libvirt.git
rpc: Need to virCommandFree on error path
This commit is contained in:
parent
ce6de782e9
commit
0ea43d177c
|
@ -704,6 +704,7 @@ int virNetSocketNewConnectSSH(const char *nodename,
|
|||
|
||||
virBufferEscapeShell(&buf, netcat);
|
||||
if (virBufferError(&buf)) {
|
||||
virCommandFree(cmd);
|
||||
virBufferFreeAndReset(&buf);
|
||||
virReportOOMError();
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue