[gnome-keyring/wip/dueno/ssh-agent-2: 3/8] 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/wip/dueno/ssh-agent-2: 3/8] login: Don't assume error if there is no matching token
- Date: Fri, 16 Feb 2018 17:25:37 +0000 (UTC)
commit 78e7c9c6ed74f8b7b3c4ef20c4b2822da9172cdf
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 4ff6595..777577e 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]