gnome-keyring r1715 - in branches/gnome-2-26: . daemon



Author: stefw
Date: Fri Apr 10 20:21:02 2009
New Revision: 1715
URL: http://svn.gnome.org/viewvc/gnome-keyring?rev=1715&view=rev

Log:
Fix crash caused by not holding	a reference to the keyring while prompting.

Modified:
   branches/gnome-2-26/ChangeLog
   branches/gnome-2-26/daemon/gkr-daemon-ops.c

Modified: branches/gnome-2-26/daemon/gkr-daemon-ops.c
==============================================================================
--- branches/gnome-2-26/daemon/gkr-daemon-ops.c	(original)
+++ branches/gnome-2-26/daemon/gkr-daemon-ops.c	Fri Apr 10 20:21:02 2009
@@ -1603,6 +1603,8 @@
 	GkrKeyringItem *item;
 	GList *ilist;
 	
+	g_object_ref (keyring);
+	
 	for (ilist = keyring->items; ilist != NULL; ilist = ilist->next) {
 		item = ilist->data;
 		if (!gkr_keyring_item_match (item, ctx->type, keyring->locked ? ctx->hashed : ctx->attributes, FALSE))
@@ -1612,7 +1614,7 @@
 			
 		if (keyring->locked) {
 			if (!request_keyring_access (ctx->req, keyring))
-				return TRUE;
+				break;
 		}
 
 		if (request_item_access (ctx->req, item, GNOME_KEYRING_ACCESS_READ, TRUE)) {
@@ -1620,7 +1622,9 @@
 			ctx->items = g_list_prepend (ctx->items, item);
 		}
 	}
-	
+
+	g_object_unref (keyring);
+
 	return TRUE;
 }
 



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