
On Tue, Feb 16, 2010 at 08:29:17AM +0100, Jim Meyering wrote:
Here's the patch (entire function below):
From 1ee0edab5356ca8cd84a88e4e4a2e4f3cd916f57 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Tue, 16 Feb 2010 08:22:34 +0100 Subject: [PATCH] qemuMonitorTextAddDevice: avoid unconditional leak
* src/qemu/qemu_monitor_text.c (qemuMonitorTextAddDevice): Free the device name 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 e993699..c71bf1d 100644 --- a/src/qemu/qemu_monitor_text.c +++ b/src/qemu/qemu_monitor_text.c @@ -2087,6 +2087,7 @@ int qemuMonitorTextAddDevice(qemuMonitorPtr mon, cleanup: VIR_FREE(cmd); VIR_FREE(reply); + VIR_FREE(safedev); return ret; }
ACK, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/