[gnome-keyring/dbus-api] [gck] Authenticator always has a login.



commit a4cd86635a776d13ab99076df29b12dc536d1bba
Author: Stef Walter <stef memberwebs com>
Date:   Sat Aug 15 13:41:40 2009 +0000

    [gck] Authenticator always has a login.
    
    A GckAuthenticator always has a login, even if the secret inside that login
    is NULL.

 pkcs11/gck/gck-authenticator.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/pkcs11/gck/gck-authenticator.c b/pkcs11/gck/gck-authenticator.c
index 8337795..6818a86 100644
--- a/pkcs11/gck/gck-authenticator.c
+++ b/pkcs11/gck/gck-authenticator.c
@@ -311,12 +311,11 @@ gck_authenticator_create (GckObject *object, CK_UTF8CHAR_PTR pin,
 	g_return_val_if_fail (GCK_IS_OBJECT (object), CKR_GENERAL_ERROR);
 	g_return_val_if_fail (result, CKR_GENERAL_ERROR);
 	
-	if (pin != NULL)
-		login = gck_secret_new_from_login (pin, n_pin);
-	
+	login = gck_secret_new_from_login (pin, n_pin);
 	auth = g_object_new (GCK_TYPE_AUTHENTICATOR, 
 	                     "module", gck_object_get_module (object), 
 	                     "login", login, "object", object, NULL);
+	g_object_unref (login);
 	
 	/* Now the unlock must work */
 	rv = gck_object_unlock (object, auth);



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