From 882f12f31708954decce35911bddd25f80761c49 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 3 Sep 2013 15:26:02 +0200 Subject: Bug #707048 - [bbdb] GError double free when contact save fails --- plugins/bbdb/gaimbuddies.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c index fe974df502..7f55c18fde 100644 --- a/plugins/bbdb/gaimbuddies.c +++ b/plugins/bbdb/gaimbuddies.c @@ -270,7 +270,7 @@ bbdb_sync_buddy_list_in_thread (gpointer data) /* Write it out to the addressbook */ if (!e_book_client_modify_contact_sync (client, c, NULL, &error)) { g_warning ("bbdb: Could not modify contact: %s", error->message); - g_error_free (error); + g_clear_error (&error); } g_slist_free_full ( @@ -290,7 +290,7 @@ bbdb_sync_buddy_list_in_thread (gpointer data) uid = NULL; if (!e_book_client_add_contact_sync (client, c, &uid, NULL, &error)) { g_warning ("bbdb: Failed to add new contact: %s", error->message); - g_error_free (error); + g_clear_error (&error); goto exit; } @@ -368,9 +368,7 @@ bbdb_merge_buddy_to_contact (EBookClient *client, EContactField field; GList *ims; gboolean dirty = FALSE; - EContactPhoto *photo = NULL; - GError *error = NULL; /* Set the IM account */ -- cgit