From e8aeb59293063cb4cfedddcaf27da665f9d968e0 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Thu, 5 Jan 2012 20:01:30 +0100 Subject: cli: use g_list_free_full() when possible --- cli/mmcli-manager.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cli/mmcli-manager.c') diff --git a/cli/mmcli-manager.c b/cli/mmcli-manager.c index 718a45be..e9d9a93c 100644 --- a/cli/mmcli-manager.c +++ b/cli/mmcli-manager.c @@ -230,8 +230,7 @@ list_current_modems (MMManager *manager) for (l = modems; l; l = g_list_next (l)) { print_modem_short_info (MM_OBJECT (l->data)); } - g_list_foreach (modems, (GFunc)g_object_unref, NULL); - g_list_free (modems); + g_list_free_full (modems, (GDestroyNotify) g_object_unref); } g_print ("\n"); } -- cgit v1.2.3-70-g09d2