[libvirt-sandbox] GVirSandboxConfigNetwork: Fix small finalize() leak

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

 



The content of the 'addrs' and 'routes' lists is freed, but the list
themselves were not g_list_free()'ed
---
 libvirt-sandbox/libvirt-sandbox-config-network.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libvirt-sandbox/libvirt-sandbox-config-network.c b/libvirt-sandbox/libvirt-sandbox-config-network.c
index 555a360..eb6a569 100644
--- a/libvirt-sandbox/libvirt-sandbox-config-network.c
+++ b/libvirt-sandbox/libvirt-sandbox-config-network.c
@@ -131,7 +131,9 @@ static void gvir_sandbox_config_network_finalize(GObject *object)
     g_free(priv->source);
     g_free(priv->mac);
     g_list_foreach(priv->addrs, (GFunc)g_object_unref, NULL);
+    g_list_free(priv->addrs);
     g_list_foreach(priv->routes, (GFunc)g_object_unref, NULL);
+    g_list_free(priv->routes);
 
     G_OBJECT_CLASS(gvir_sandbox_config_network_parent_class)->finalize(object);
 }
-- 
1.8.4.2

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