[gdl] Use g_slist_free_full



commit b9f24c1f22d9dfb7c3b06f4bb865405ace7cbdae
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed May 4 10:29:36 2011 +0200

    Use g_slist_free_full

 gdl/gdl-switcher.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gdl/gdl-switcher.c b/gdl/gdl-switcher.c
index 623d437..266fe62 100644
--- a/gdl/gdl-switcher.c
+++ b/gdl/gdl-switcher.c
@@ -668,9 +668,8 @@ gdl_switcher_dispose (GObject *object)
     }
     g_object_unref (gconf_client);
 #endif
-    
-    g_slist_foreach (priv->buttons, (GFunc) button_free, NULL);
-    g_slist_free (priv->buttons);
+
+    g_slist_free_full (priv->buttons, (GDestroyNotify)button_free);
     priv->buttons = NULL;
 
     G_OBJECT_CLASS (gdl_switcher_parent_class)->dispose (object);



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