mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 05:17:54 +03: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:
parent
462abad2e7
commit
30b2ebb284
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user