From 7b811a74c66ba8a25b6bbe45ad67b0f450415649 Mon Sep 17 00:00:00 2001 From: Alex Jia Date: Wed, 30 Nov 2011 14:49:51 +0800 Subject: [PATCH] qemu: Plug memory leak onqemuProcessWaitForMonitor() error path Detected by Coverity. Leak introduced in commit 109efd7. Signed-off-by: Alex Jia --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index fec3aa813e..ab0cb2b40d 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -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,