mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 19:45:21 +00:00
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
@ -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
Block a user