]> 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:26:44 +0000 (09:26 +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 837b2d5199df003cd6471b4a6fef046c13b594a8..09ab4dd18b12babf9a4f3af8926a8f3699cd620a 100644 (file)
@@ -664,7 +664,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);