[evolution-ews] Handle a situation where memory was leaked when error was returned in ews_cal_modify_object_cb()



commit 6bac2aea4bc8f7bdf44c58bcb121dac439e40753
Author: Or Goshen <orx goshen intel com>
Date:   Thu Aug 25 13:12:30 2011 +0300

    Handle a situation where memory was leaked when error was returned in ews_cal_modify_object_cb()

 src/calendar/e-cal-backend-ews.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 17d2594..c8869c2 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1632,7 +1632,9 @@ ews_cal_modify_object_cb (GObject *object, GAsyncResult *res, gpointer user_data
 		/* The calendar UI doesn't *display* errors unless they have
 		   the OtherError code */
 		error->code = OtherError;
-		return;
+		if (modify_data->context)
+			e_data_cal_notify_object_modified (modify_data->cal, modify_data->context, error, NULL, NULL);
+		goto exit;
 	}
 
 	g_object_ref (modify_data->comp);
@@ -1677,6 +1679,7 @@ ews_cal_modify_object_cb (GObject *object, GAsyncResult *res, gpointer user_data
 
 	e_cal_backend_store_thaw_changes (priv->store);
 
+exit:
 	icalproperty_free (icalprop);
 	e_cal_component_free_id (id);
 	g_free(comp_str);



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