[gvfs] udisks2: Handle libsecret error properly



commit 5c2ac3f1ac452755df1c08480a0ee944138b42ec
Author: Ross Lagerwall <rosslagerwall gmail com>
Date:   Mon Jun 22 08:02:39 2015 +0100

    udisks2: Handle libsecret error properly
    
    secret_password_clear_finish() returns whether any passwords are
    removed, so it may return FALSE without setting error. Handle this
    properly (in this case all we care about is that there wasn't an error).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751038

 monitor/udisks2/gvfsudisks2volume.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/monitor/udisks2/gvfsudisks2volume.c b/monitor/udisks2/gvfsudisks2volume.c
index 5e83c2c..fac90e5 100644
--- a/monitor/udisks2/gvfsudisks2volume.c
+++ b/monitor/udisks2/gvfsudisks2volume.c
@@ -1119,7 +1119,8 @@ luks_delete_passphrase_cb (GObject      *source,
   MountData *data = user_data;
   GError *error = NULL;
 
-  if (secret_password_clear_finish (result, &error))
+  secret_password_clear_finish (result, &error);
+  if (!error)
     {
       /* with the bad passphrase out of the way, try again */
       g_free (data->passphrase);


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