[gnome-keyring] [dbus] Fix issue with uninitialized variable being used.



commit 31c447a44a26693c0f769938eaf736fb7fea5353
Author: Stef Walter <stef memberwebs com>
Date:   Sat Jan 2 23:59:45 2010 +0000

    [dbus] Fix issue with uninitialized variable being used.

 daemon/dbus/gkd-secret-service.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-service.c b/daemon/dbus/gkd-secret-service.c
index 4432222..81be623 100644
--- a/daemon/dbus/gkd-secret-service.c
+++ b/daemon/dbus/gkd-secret-service.c
@@ -579,7 +579,7 @@ service_method_read_alias (GkdSecretService *self, DBusMessage *message)
 	const char *alias;
 	gchar *path = NULL;
 	const gchar *identifier;
-	GP11Object  *collection;
+	GP11Object  *collection = NULL;
 
 	if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &alias, DBUS_TYPE_INVALID))
 		return NULL;
@@ -591,8 +591,9 @@ service_method_read_alias (GkdSecretService *self, DBusMessage *message)
 		path = gkd_secret_util_build_path (SECRET_COLLECTION_PREFIX, identifier, -1);
 
 	/* Make sure it actually exists */
-	collection = gkd_secret_objects_lookup_collection (self->objects,
-	                                                   dbus_message_get_sender (message), path);
+	if (path)
+		collection = gkd_secret_objects_lookup_collection (self->objects,
+		                                                   dbus_message_get_sender (message), path);
 	if (collection == NULL) {
 		g_free (path);
 		path = NULL;



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