[PATCH 08/11] rpc: Need to virCommandFree on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/rpc/virnetsocket.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
index 0158970..93980d6 100644
--- a/src/rpc/virnetsocket.c
+++ b/src/rpc/virnetsocket.c
@@ -704,6 +704,7 @@ int virNetSocketNewConnectSSH(const char *nodename,
 
     virBufferEscapeShell(&buf, netcat);
     if (virBufferError(&buf)) {
+        virCommandFree(cmd);
         virBufferFreeAndReset(&buf);
         virReportOOMError();
         return -1;
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]