From: Emilio Pozuelo Monfort Date: Wed, 7 Aug 2013 17:29:15 +0000 (+0200) Subject: Don't dereference a NULL error X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=a243fdeec4e1f6cb2aff0e7a821fd167f21932bf Don't dereference a NULL error 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 --- diff --git a/libempathy/empathy-keyring.c b/libempathy/empathy-keyring.c index 837b2d51..09ab4dd1 100644 --- a/libempathy/empathy-keyring.c +++ b/libempathy/empathy-keyring.c @@ -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);