[evolution-ews] Place allocated memory into a variable, so it can be freed right after its use
- From: Or Goshen <ogosh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Place allocated memory into a variable, so it can be freed right after its use
- Date: Thu, 25 Aug 2011 12:57:34 +0000 (UTC)
commit dbe6ad371d47da4b7e6e136ffa3437f9598c0151
Author: Or Goshen <orx goshen intel com>
Date: Thu Aug 25 15:54:12 2011 +0300
Place allocated memory into a variable, so it can be freed right after its use
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 9ff04b8..66ededa 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -1358,6 +1358,7 @@ ews_create_object_cb(GObject *object, GAsyncResult *res, gpointer user_data)
guint n_attach;
gboolean result;
EEwsItem *item;
+ gchar *comp_str;
/* get a list of ids from server (single item) */
e_ews_connection_create_items_finish(cnc, res, &ids, &error);
@@ -1446,7 +1447,9 @@ ews_create_object_cb(GObject *object, GAsyncResult *res, gpointer user_data)
e_cal_component_get_uid(create_data->comp, &comp_uid);
- e_data_cal_notify_object_created (create_data->cal, create_data->context, error, comp_uid, e_cal_component_get_as_string(create_data->comp));
+ comp_str = e_cal_component_get_as_string(create_data->comp);
+ e_data_cal_notify_object_created (create_data->cal, create_data->context, error, comp_uid, comp_str);
+ g_free (comp_str);
/* place new component in our cache */
PRIV_LOCK (priv);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]