[empathy] Don't dereference a NULL error
- From: Emilio Pozuelo Monfort <epm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] Don't dereference a NULL error
- Date: Thu, 8 Aug 2013 07:43:14 +0000 (UTC)
commit be542f50da6bc3e7d24b808aac16b1f542be7dc0
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date: Wed Aug 7 19:29:15 2013 +0200
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
libempathy/empathy-keyring.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libempathy/empathy-keyring.c b/libempathy/empathy-keyring.c
index 4066734..367346b 100644
--- a/libempathy/empathy-keyring.c
+++ b/libempathy/empathy-keyring.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]