From 20acb274dcd1924d64b56021fd0c3125c95d9fee Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 5 Jan 2012 20:01:16 +0100 Subject: [PATCH] libmm-glib: use g_list_free_full() when possible --- libmm-glib/mm-modem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libmm-glib/mm-modem.c b/libmm-glib/mm-modem.c index 35ad65cd..2b9fbc1e 100644 --- a/libmm-glib/mm-modem.c +++ b/libmm-glib/mm-modem.c @@ -874,8 +874,7 @@ typedef struct { static void bearer_object_list_free (GList *list) { - g_list_foreach (list, (GFunc)g_object_unref, NULL); - g_list_free (list); + g_list_free_full (list, (GDestroyNotify) g_object_unref); } static void