[gnome-online-accounts/gnome-3-16] client, identity: Use g_list_free_full wherever applicable



commit 85d8640b2795d1b7c1bfee7948bf08b8c920df18
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri May 29 15:40:32 2015 +0200

    client, identity: Use g_list_free_full wherever applicable
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693578

 src/goa/goaclient.c                          |    3 +--
 src/goaidentity/goakerberosidentitymanager.c |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/goa/goaclient.c b/src/goa/goaclient.c
index 76caa2f..5309bd3 100644
--- a/src/goa/goaclient.c
+++ b/src/goa/goaclient.c
@@ -471,8 +471,7 @@ goa_client_get_accounts (GoaClient *self)
       if (goa_object_peek_account (object) != NULL)
         ret = g_list_prepend (ret, g_object_ref (object));
     }
-  g_list_foreach (objects, (GFunc) g_object_unref, NULL);
-  g_list_free (objects);
+  g_list_free_full (objects, g_object_unref);
 
   return ret;
 }
diff --git a/src/goaidentity/goakerberosidentitymanager.c b/src/goaidentity/goakerberosidentitymanager.c
index c9796ad..44f9bfa 100644
--- a/src/goaidentity/goakerberosidentitymanager.c
+++ b/src/goaidentity/goakerberosidentitymanager.c
@@ -589,8 +589,7 @@ identity_sort_func (GoaIdentity *a,
 static void
 free_identity_list (GList *list)
 {
-  g_list_foreach (list, (GFunc) g_object_unref, NULL);
-  g_list_free (list);
+  g_list_free_full (list, g_object_unref);
 }
 
 static void


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