[gnome-online-accounts/gnome-3-6] identity: Don't leak the GoaKerberosIdentity



commit b91e1b810a0f2799533a559f430259a3e7d0e034
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Jan 8 17:27:20 2013 +0100

    identity: Don't leak the GoaKerberosIdentity
    
    Fixes: https://bugzilla.gnome.org/691142

 src/goaidentity/goakerberosidentitymanager.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentitymanager.c b/src/goaidentity/goakerberosidentitymanager.c
index d90fb9d..62c4a2a 100644
--- a/src/goaidentity/goakerberosidentitymanager.c
+++ b/src/goaidentity/goakerberosidentitymanager.c
@@ -555,6 +555,7 @@ refresh_identities (GoaKerberosIdentityManager *self,
       if (identity != NULL)
         {
           refresh_identity (self, operation, refreshed_identities, identity);
+          g_object_unref (identity);
         }
 
       krb5_cc_close (self->priv->kerberos_context, cache);
@@ -840,6 +841,10 @@ sign_in_identity (GoaKerberosIdentityManager *self,
             }
         }
     }
+  else
+    {
+      g_object_ref (identity);
+    }
 
   g_hash_table_replace (self->priv->identities,
                         g_strdup (operation->identifier),
@@ -869,6 +874,8 @@ sign_in_identity (GoaKerberosIdentityManager *self,
                                                  (GDestroyNotify)
                                                  g_object_unref);
     }
+
+  g_object_unref (identity);
 }
 
 static void


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