[PATCH 2/2] qemu: fix a mem leak

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

 



From: Chen Hanxiao <chenhanxiao@xxxxxxxxx>

fix a mem leak

Signed-off-by: Chen Hanxiao <chenhanxiao@xxxxxxxxx>
---
 src/qemu/qemu_driver.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5c55c69af..14b72a8f6 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20682,6 +20682,8 @@ qemuARPGetInterfaces(virDomainObjPtr vm,
 
                 if (VIR_APPEND_ELEMENT(ifaces_ret, ifaces_count, iface) < 0)
                     goto cleanup;
+
+                virDomainInterfaceFree(iface);
             }
         }
     }
@@ -20691,6 +20693,7 @@ qemuARPGetInterfaces(virDomainObjPtr vm,
 
  cleanup:
     virArpTableFree(table);
+    virDomainInterfaceFree(iface);
 
     if (ifaces_ret) {
         for (i = 0; i < ifaces_count; i++)
-- 
2.14.3

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