mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
test: Fix resource leak in qemumonitorjsontest
Introduced by commmit id 37bd4571c. Need to goto cleanup and
not return directly.
Found by Coverity
Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Katerina Koukiou <kkoukiou@redhat.com>
This commit is contained in:
@@ -2693,7 +2693,7 @@ testQemuMonitorCPUInfo(const void *opaque)
|
||||
|
||||
vm = qemuMonitorTestGetDomainObj(test);
|
||||
if (!vm)
|
||||
return -1;
|
||||
goto cleanup;
|
||||
|
||||
rc = qemuMonitorGetCPUInfo(qemuMonitorTestGetMonitor(test),
|
||||
&vcpus, data->maxvcpus, true, data->fast);
|
||||
|
||||
Reference in New Issue
Block a user