[PATCH 3/3] conf: Fix memory leak for distances in virDomainNumaFree

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

 



Commit id '74119a03f' neglected to clean up @distances when
the numa definition is cleaned up.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/numa_conf.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
index eadf8f2282..c906a53de0 100644
--- a/src/conf/numa_conf.c
+++ b/src/conf/numa_conf.c
@@ -362,6 +362,9 @@ virDomainNumaFree(virDomainNumaPtr numa)
     for (i = 0; i < numa->nmem_nodes; i++) {
         virBitmapFree(numa->mem_nodes[i].cpumask);
         virBitmapFree(numa->mem_nodes[i].nodeset);
+
+        if (numa->mem_nodes[i].ndistances > 0)
+            VIR_FREE(numa->mem_nodes[i].distances);
     }
     VIR_FREE(numa->mem_nodes);
 
-- 
2.13.6

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