2012-10-12 [mones] 3.8.1cvs98
[claws.git] / src / common / utils.c
index 1696267..1e39043 100644 (file)
@@ -264,6 +264,19 @@ void slist_free_strings(GSList *list)
        }
 }
 
+void slist_free_strings_full(GSList *list)
+{
+#if GLIB_CHECK_VERSION(2,28,0)
+       g_slist_free_full(list, (GDestroyNotify)g_free);
+#else
+       while (list != NULL) {
+               g_free(list->data);
+               list = list->next;
+       }
+       g_slist_free(list);
+#endif
+}
+
 static void hash_free_strings_func(gpointer key, gpointer value, gpointer data)
 {
        g_free(key);