mirror of https://gitee.com/openkylin/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 <phrdina@redhat.com>
This commit is contained in:
parent
39df9d2f12
commit
efd30e2e1c
|
@ -1067,6 +1067,7 @@ qemuMonitorFindObjectPath(qemuMonitorPtr mon,
|
|||
}
|
||||
|
||||
ret = qemuMonitorFindObjectPath(mon, nextpath, name, path);
|
||||
VIR_FREE(nextpath);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue