mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03: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);
|
||||
qemuMonitorTestFree(data->mon);
|
||||
VIR_FREE(data);
|
||||
}
|
||||
|
||||
|
||||
@ -434,6 +435,8 @@ testQemuHotplugCpuPrepare(const char *test,
|
||||
if (qemuDomainRefreshVcpuInfo(&driver, data->vm, 0, false) < 0)
|
||||
goto error;
|
||||
|
||||
VIR_FREE(prefix);
|
||||
|
||||
return data;
|
||||
|
||||
error:
|
||||
|
Loading…
Reference in New Issue
Block a user