[network-manager-applet/nma-0-9-8] gsm: fix a crash while getting PIN from a keyring (rh #950925)



commit 4fd9ead9e77cd3eb7c9f606fecdfff1e1ab0576d
Author: Jiří Klimeš <jklimes redhat com>
Date:   Mon Apr 15 09:29:56 2013 +0200

    gsm: fix a crash while getting PIN from a keyring (rh #950925)
    
    secret_service_search_finish() can return an empty list without any error.

 src/applet-device-gsm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index 4575f39..66abe82 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -810,10 +810,10 @@ keyring_pin_check_cb (GObject *source,
 
        list = secret_service_search_finish (NULL, result, &error);
 
-       if (error != NULL) {
+       if (!list) {
                /* No saved PIN, just ask the user */
                unlock_dialog_new (info->device, info);
-               g_error_free (error);
+               g_clear_error (&error);
                return;
        }
 


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