mirror of https://gitee.com/openkylin/libvirt.git
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>
This commit is contained in:
parent
b0c6300fc4
commit
d63f1c6ad9
src/qemu
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue