]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Plug memory leak onqemuProcessWaitForMonitor() error path
authorAlex Jia <ajia@redhat.com>
Wed, 30 Nov 2011 06:49:51 +0000 (14:49 +0800)
committerEric Blake <eblake@redhat.com>
Wed, 30 Nov 2011 21:39:36 +0000 (14:39 -0700)
Detected by Coverity. Leak introduced in commit 109efd7.

Signed-off-by: Alex Jia <ajia@redhat.com>
src/qemu/qemu_process.c

index fec3aa813e3492d115730a6334dbe2f8d1b04f09..ab0cb2b40db8a786a2d36f7de16d2334472ca1ae 100644 (file)
@@ -1225,7 +1225,7 @@ qemuProcessWaitForMonitor(struct qemud_driver* driver,
 
         if (VIR_ALLOC_N(buf, buf_size) < 0) {
             virReportOOMError();
-            return -1;
+            goto closelog;
         }
 
         if (qemuProcessReadLogOutput(vm, logfd, buf, buf_size,