[PATCH] conf: avoid mem leak re-allocating fake NUMA capabilities

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

 



The 'caps' object is already allocated when the fake NUMA
initialization takes place.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/conf/capabilities.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index 4fac59e6f7..81a2004dba 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1628,9 +1628,6 @@ virCapabilitiesHostNUMAInitFake(virCapsHostNUMAPtr caps)
         }
     }
 
-    caps = g_new0(virCapsHostNUMA, 1);
-    caps->cells = g_ptr_array_new_with_free_func(
-        (GDestroyNotify)virCapabilitiesFreeHostNUMACell);
     virCapabilitiesHostNUMAAddCell(caps, 0,
                                    nodeinfo.memory,
 #ifdef __linux__
-- 
2.23.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