[gnome-online-accounts/gnome-3-16] identity: Simplify the destruction
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-16] identity: Simplify the destruction
- Date: Fri, 29 May 2015 14:21:54 +0000 (UTC)
commit cb0f1d1a778f6568391895590bbc8e6221298649
Author: Debarshi Ray <debarshir gnome org>
Date: Fri May 29 15:45:10 2015 +0200
identity: Simplify the destruction
GoaKerberosIdentityQuery doesn't hold any references so there is no
need to free the list in dispose. We can use the dummy finalize that we
already have and avoid the complexity.
https://bugzilla.gnome.org/show_bug.cgi?id=693578
src/goaidentity/goakerberosidentityinquiry.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentityinquiry.c b/src/goaidentity/goakerberosidentityinquiry.c
index 7c9a84a..4560b35 100644
--- a/src/goaidentity/goakerberosidentityinquiry.c
+++ b/src/goaidentity/goakerberosidentityinquiry.c
@@ -102,15 +102,15 @@ goa_kerberos_identity_inquiry_dispose (GObject *object)
g_clear_object (&self->priv->identity);
g_clear_pointer (&self->priv->name, (GDestroyNotify) g_free);
g_clear_pointer (&self->priv->banner, (GDestroyNotify) g_free);
-
- g_list_foreach (self->priv->queries,
- (GFunc) goa_kerberos_identity_query_free, NULL);
- g_clear_pointer (&self->priv->queries, (GDestroyNotify) g_list_free);
}
static void
goa_kerberos_identity_inquiry_finalize (GObject *object)
{
+ GoaKerberosIdentityInquiry *self = GOA_KERBEROS_IDENTITY_INQUIRY (object);
+
+ g_list_free_full (self->priv->queries, (GDestroyNotify) goa_kerberos_identity_query_free);
+
G_OBJECT_CLASS (goa_kerberos_identity_inquiry_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]