提交 d63f1c6a 编写于 作者: W w00251574 提交者: Michal Privoznik

qemu: monitor: Fix memory leak in qemuMonitorJSONNBDServerStart()

Exiting early through the return path did result in 'port_str'
being leaked.

Signed-off-by: Jie Wang <wangjie88.huawei.com>
上级 b0c6300f
......@@ -6540,7 +6540,7 @@ qemuMonitorJSONNBDServerStart(qemuMonitorPtr mon,
return ret;
if (!(addr = qemuMonitorJSONBuildInetSocketAddress(host, port_str)))
return ret;
goto cleanup;
if (!(cmd = qemuMonitorJSONMakeCommand("nbd-server-start",
"a:addr", &addr,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册