From e5d2b428b86f3a09bbd035332698123971545d99 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 12 Sep 2019 11:21:56 +0200 Subject: Use g_list_free_full and g_slist_free_full void g_list_free_full (GList *list, GDestroyNotify free_func); void g_slist_free_full (GList *list, GDestroyNotify free_func); Convenience methods, which free all the memory used by a list, and calls free_func on every element's data. --- src/eggfileformatchooser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/eggfileformatchooser.c') diff --git a/src/eggfileformatchooser.c b/src/eggfileformatchooser.c index cd9d4a0..f4d5a4e 100644 --- a/src/eggfileformatchooser.c +++ b/src/eggfileformatchooser.c @@ -106,8 +106,7 @@ egg_file_format_filter_info_free (gpointer boxed) self = boxed; g_hash_table_unref (self->extension_set); - g_slist_foreach (self->extension_list, (GFunc) g_free, NULL); - g_slist_free (self->extension_list); + g_slist_free_full (self->extension_list, g_free); g_free (self->name); g_free (self); } -- cgit v1.2.1