[evolution-ews] ECalBackendEws: Do not cause double-free of a GError



commit 4382c528c91de13c4a9bb32081cb63d59b032955
Author: Milan Crha <mcrha redhat com>
Date:   Wed Mar 12 15:43:08 2014 +0100

    ECalBackendEws: Do not cause double-free of a GError
    
    The e_data_cal_respond_...() functions "eat" the GError, thus the later
    functions cannot free or otherwise use it.

 src/calendar/e-cal-backend-ews.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 4ace6da..9f22c68 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1186,8 +1186,7 @@ exit:
 
        if (context)
                e_data_cal_respond_remove_objects (cal, context, error, NULL, NULL, NULL);
-
-       if (error != NULL) {
+       else if (error != NULL) {
                g_warning ("Remove object error :  %s\n", error->message);
                g_clear_error (&error);
        }
@@ -1503,6 +1502,7 @@ ews_create_object_cb (GObject *object,
 
        convert_error_to_edc_error (&error);
        e_data_cal_respond_create_objects (create_data->cal, create_data->context, error, new_uids, 
new_comps);
+       error = NULL;
 
        g_slist_free (new_uids);
        g_slist_free (new_comps);


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