]> git.0d.be Git - empathy.git/commitdiff
Don't dereference a NULL error
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 7 Aug 2013 17:29:15 +0000 (19:29 +0200)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 8 Aug 2013 07:42:54 +0000 (09:42 +0200)
libsecret returns FALSE without an error in some cases but we
unconditionally dereference it, causing a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=692105

libempathy/empathy-keyring.c

index 40667342faaa8c1708fbe4751a73e857f71a13df..367346b0a6f0f0d10f4b1300877107e7b7efff06 100644 (file)
@@ -656,7 +656,8 @@ items_delete_cb (GObject *source,
   GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (user_data);
   GError *error = NULL;
 
-  if (!secret_password_clear_finish (result, &error))
+  secret_password_clear_finish (result, &error);
+  if (error != NULL)
     {
       g_simple_async_result_set_error (simple, TP_ERROR,
               TP_ERROR_DOES_NOT_EXIST, "%s", error->message);