[PATCH] tests: qemuhotplug: Fix memory leaks after cpu hotplug testing patches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



testQemuHotplugCpuDataFree leaked @data always and
testQemuHotplugCpuPrepare leaked @prefix on success
---

Pushed as trivial.

 tests/qemuhotplugtest.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 9a203bd44..8cceb883e 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:
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux