From: Pavel Hrdina Date: Tue, 24 Feb 2015 13:31:37 +0000 (+0100) Subject: qemu: fix memory leak while starting a guest X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=efd30e2e1cb2b9e467c225db92e8a16eb8de2632;p=libvirt.git qemu: fix memory leak while starting a guest In commit cc41c648 I've re-factored qemuMonitorFindBalloonObjectPath, but missed that there is a memory leak. The "nextpath" variable is overwritten while looping in for cycle and we have to free it before next cycle. Signed-off-by: Pavel Hrdina --- diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 6882a50479..94495cd717 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1067,6 +1067,7 @@ qemuMonitorFindObjectPath(qemuMonitorPtr mon, } ret = qemuMonitorFindObjectPath(mon, nextpath, name, path); + VIR_FREE(nextpath); } }