[nautilus-sendto/gnome-3-0] evolution: Fix possible double-free crash



commit df52239f98904bee8e14d318af585513a753804b
Author: Milan Crha <mcrha redhat com>
Date:   Wed Apr 11 11:54:42 2012 +0100

    evolution: Fix possible double-free crash
    
    Due to error handling.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=644531

 src/plugins/evolution/e-contact-entry.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/evolution/e-contact-entry.c b/src/plugins/evolution/e-contact-entry.c
index f96686e..14a822d 100644
--- a/src/plugins/evolution/e-contact-entry.c
+++ b/src/plugins/evolution/e-contact-entry.c
@@ -517,8 +517,11 @@ e_contact_entry_set_source_list (EContactEntry *entry,
 
       if ((lookup->book = e_book_new (s, &error)) == NULL) {
         /* TODO handle this better, fire the error signal I guess */
-        g_warning ("%s", error->message);
-	g_error_free (error);
+	if (error) {
+           g_warning ("%s", error->message);
+           g_error_free (error);
+           error = NULL;
+        }
 	g_free (lookup);
       } else {
         entry->priv->lookup_entries = g_list_append (entry->priv->lookup_entries, lookup);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]