From: Peter Krempa Date: Thu, 2 Feb 2017 14:57:29 +0000 (+0100) Subject: tests: qemuhotplug: Fix memory leaks after cpu hotplug testing patches X-Git-Tag: CVE-2017-2635~196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ae7b0d8af54b795bc801e5a42a8883dd2b9443c;p=thirdparty%2Flibvirt.git tests: qemuhotplug: Fix memory leaks after cpu hotplug testing patches testQemuHotplugCpuDataFree leaked @data always and testQemuHotplugCpuPrepare leaked @prefix on success --- diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 9a203bd440..8cceb883ed 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -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: