[gnome-online-accounts/f18] Do not leak timer FDs (GNOME #691142)

Debarshi Ray rishi at fedoraproject.org
Tue Jan 8 16:48:19 UTC 2013


commit 73514c18f466ad0590221c25ae400b1cf7ba409d
Author: Debarshi Ray <debarshir at gnome.org>
Date:   Tue Jan 8 17:48:13 2013 +0100

    Do not leak timer FDs (GNOME #691142)

 ...Don-t-try-to-sign-in-with-a-NULL-identity.patch |   25 +++++++++++
 ...entity-Don-t-leak-the-GoaKerberosIdentity.patch |   45 ++++++++++++++++++++
 gnome-online-accounts.spec                         |    9 ++++-
 3 files changed, 78 insertions(+), 1 deletions(-)
---
diff --git a/0001-identity-Don-t-try-to-sign-in-with-a-NULL-identity.patch b/0001-identity-Don-t-try-to-sign-in-with-a-NULL-identity.patch
new file mode 100644
index 0000000..0a2643e
--- /dev/null
+++ b/0001-identity-Don-t-try-to-sign-in-with-a-NULL-identity.patch
@@ -0,0 +1,25 @@
+From e2286c0a75a9e76557e71061b1b10fd3acf1170f Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir at gnome.org>
+Date: Tue, 8 Jan 2013 16:48:17 +0100
+Subject: [PATCH 1/2] identity: Don't try to sign in with a NULL identity
+
+---
+ src/goaidentity/goakerberosidentitymanager.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/goaidentity/goakerberosidentitymanager.c b/src/goaidentity/goakerberosidentitymanager.c
+index 3b7f6c6..d90fb9d 100644
+--- a/src/goaidentity/goakerberosidentitymanager.c
++++ b/src/goaidentity/goakerberosidentitymanager.c
+@@ -822,7 +822,7 @@ sign_in_identity (GoaKerberosIdentityManager *self,
+                                            GOA_IDENTITY_MANAGER_ERROR_CREATING_IDENTITY,
+                                            _("Could not create credential cache for identity"));
+           g_simple_async_result_set_op_res_gpointer (operation->result, NULL, NULL);
+-
++          return;
+         }
+       else
+         {
+-- 
+1.8.0.2
+
diff --git a/0002-identity-Don-t-leak-the-GoaKerberosIdentity.patch b/0002-identity-Don-t-leak-the-GoaKerberosIdentity.patch
new file mode 100644
index 0000000..6900155
--- /dev/null
+++ b/0002-identity-Don-t-leak-the-GoaKerberosIdentity.patch
@@ -0,0 +1,45 @@
+From 3e98fb8e88f12a47a1df2a4c22938c4f4c0edfd0 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir at gnome.org>
+Date: Tue, 8 Jan 2013 17:27:20 +0100
+Subject: [PATCH 2/2] identity: Don't leak the GoaKerberosIdentity
+
+Fixes: https://bugzilla.gnome.org/691142
+---
+ src/goaidentity/goakerberosidentitymanager.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+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
+-- 
+1.8.0.2
+
diff --git a/gnome-online-accounts.spec b/gnome-online-accounts.spec
index 9fd2d30..cdaf4b9 100644
--- a/gnome-online-accounts.spec
+++ b/gnome-online-accounts.spec
@@ -1,6 +1,6 @@
 Name:		gnome-online-accounts
 Version:	3.6.2
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Provide online accounts information
 
 Group:		System Environment/Libraries
@@ -8,6 +8,8 @@ License:	LGPLv2+
 URL:		https://live.gnome.org/OnlineAccounts
 
 Source0:	http://download.gnome.org/sources/gnome-online-accounts/3.6/%{name}-%{version}.tar.xz
+Patch0:		0001-identity-Don-t-try-to-sign-in-with-a-NULL-identity.patch
+Patch1:		0002-identity-Don-t-leak-the-GoaKerberosIdentity.patch
 
 BuildRequires:	gcr-devel
 BuildRequires:	glib2-devel >= 2.32
@@ -41,6 +43,8 @@ files for developing applications that use gnome-online-accounts.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 %configure \
@@ -95,6 +99,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/gtk-doc/html/goa/
 
 %changelog
+* Tue Jan 08 2013 Debarshi Ray <rishi at fedoraproject.org> - 3.6.2-2
+- Do not leak timer FDs (GNOME #691142)
+
 * Tue Nov 13 2012 Debarshi Ray <rishi at fedoraproject.org> - 3.6.2-1
 - Update to 3.6.2
 


More information about the scm-commits mailing list