mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
tests: qemuhotplug: Fix memory leaks after cpu hotplug testing patches
testQemuHotplugCpuDataFree leaked @data always and testQemuHotplugCpuPrepare leaked @prefix on success
This commit is contained in:
parent
4f405ebd1d
commit
5ae7b0d8af
@ -377,6 +377,7 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuData *data)
|
|||||||
|
|
||||||
virObjectUnref(data->vm);
|
virObjectUnref(data->vm);
|
||||||
qemuMonitorTestFree(data->mon);
|
qemuMonitorTestFree(data->mon);
|
||||||
|
VIR_FREE(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -434,6 +435,8 @@ testQemuHotplugCpuPrepare(const char *test,
|
|||||||
if (qemuDomainRefreshVcpuInfo(&driver, data->vm, 0, false) < 0)
|
if (qemuDomainRefreshVcpuInfo(&driver, data->vm, 0, false) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
VIR_FREE(prefix);
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user