]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: qemuhotplug: Fix memory leaks after cpu hotplug testing patches
authorPeter Krempa <pkrempa@redhat.com>
Thu, 2 Feb 2017 14:57:29 +0000 (15:57 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 2 Feb 2017 14:57:29 +0000 (15:57 +0100)
testQemuHotplugCpuDataFree leaked @data always and
testQemuHotplugCpuPrepare leaked @prefix on success

tests/qemuhotplugtest.c

index 9a203bd4404aef5dc884030fcb3c9a9592de767c..8cceb883ed9b0ba542ea3d144ab1fe3e63199a5b 100644 (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: