[gnome-online-accounts] client, identity: Use g_list_free_full wherever applicable
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] client, identity: Use g_list_free_full wherever applicable
- Date: Fri, 29 May 2015 14:04:58 +0000 (UTC)
commit 28dc6c5c36de958d8868e0734215f4abc3edf602
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 a1898c9..162cf3f 100644
--- a/src/goaidentity/goakerberosidentitymanager.c
+++ b/src/goaidentity/goakerberosidentitymanager.c
@@ -594,8 +594,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]