提交 efd30e2e 编写于 作者: P Pavel Hrdina

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: NPavel Hrdina <phrdina@redhat.com>
上级 39df9d2f
...@@ -1067,6 +1067,7 @@ qemuMonitorFindObjectPath(qemuMonitorPtr mon, ...@@ -1067,6 +1067,7 @@ qemuMonitorFindObjectPath(qemuMonitorPtr mon,
} }
ret = qemuMonitorFindObjectPath(mon, nextpath, name, path); ret = qemuMonitorFindObjectPath(mon, nextpath, name, path);
VIR_FREE(nextpath);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册