[gnome-keyring] login: Don't assume error if there is no matching token
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] login: Don't assume error if there is no matching token
- Date: Sat, 17 Feb 2018 09:06:15 +0000 (UTC)
commit 634008c2a127998f2b8607c84df01575f5c52b77
Author: Daiki Ueno <dueno src gnome org>
Date: Fri Feb 16 16:15:52 2018 +0100
login: Don't assume error if there is no matching token
gck_modules_token_for_uri() could return NULL without setting error if
there is no matching token.
daemon/login/gkd-login.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/daemon/login/gkd-login.c b/daemon/login/gkd-login.c
index a189c5e..75c2441 100644
--- a/daemon/login/gkd-login.c
+++ b/daemon/login/gkd-login.c
@@ -92,7 +92,10 @@ lookup_login_session (GList *modules)
slot = gck_modules_token_for_uri (modules, "pkcs11:token=Secret%20Store", &error);
if (!slot) {
- g_warning ("couldn't find secret store module: %s", egg_error_message (error));
+ if (error) {
+ g_warning ("couldn't find secret store module: %s", egg_error_message (error));
+ g_error_free (error);
+ }
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]