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 <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2015-02-24 14:31:37 +01:00
parent 39df9d2f12
commit efd30e2e1c

View File

@ -1067,6 +1067,7 @@ qemuMonitorFindObjectPath(qemuMonitorPtr mon,
}
ret = qemuMonitorFindObjectPath(mon, nextpath, name, path);
VIR_FREE(nextpath);
}
}