From efd30e2e1cb2b9e467c225db92e8a16eb8de2632 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Tue, 24 Feb 2015 14:31:37 +0100 Subject: [PATCH] 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 --- src/qemu/qemu_monitor.c | 1 + 1 file changed, 1 insertion(+) 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); } } -- GitLab