1
0
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:
Peter Krempa 2017-02-02 15:57:29 +01:00
parent 4f405ebd1d
commit 5ae7b0d8af

View File

@ -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: