On Tue, Feb 16, 2010 at 01:52:20PM +0100, Jim Meyering wrote:
First the patch, then the (fixed) function:
>From d3f0ee1ee11ca5f3709168fdc4e6eb1c56fdfbc0 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Tue, 16 Feb 2010 13:51:38 +0100
Subject: [PATCH] qemuMonitorTextAddUSBDisk: avoid unconditional leak
* src/qemu/qemu_monitor_text.c (qemuMonitorTextAddUSBDisk): Free
command output buffer.
---
src/qemu/qemu_monitor_text.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index c71bf1d..62ffcc6 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -1229,6 +1229,7 @@ int qemuMonitorTextAddUSBDisk(qemuMonitorPtr mon,
cleanup:
VIR_FREE(cmd);
VIR_FREE(safepath);
+ VIR_FREE(info);
return ret;
}
ACK too !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/