aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/pcs/cal-backend-file.c8
2 files changed, 14 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f78df1435f..b8c1b4b28e 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2001-11-08 Rodrigo Moya <rodrigo@ximian.com>
+
+ * pcs/cal-backend-file.c
+ (cal_backend_file_compute_changes_foreach_key): don't leak the
+ string returned by cal_component_get_as_string nor the temporary
+ CalComponent we create
+
2001-11-08 JP Rosevear <jpr@ximian.com>
* gui/e-itip-control.c (ok_clicked_cb): don't add the item, remove
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index de37203592..f1480a4b1d 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -1355,19 +1355,25 @@ cal_backend_file_compute_changes_foreach_key (const char *key, gpointer data)
if (calobj == NULL) {
CalComponent *comp;
GNOME_Evolution_Calendar_CalObjChange *coc;
+ char *calobj;
comp = cal_component_new ();
if (be_data->type == GNOME_Evolution_Calendar_TYPE_TODO)
cal_component_set_new_vtype (comp, CAL_COMPONENT_TODO);
else
cal_component_set_new_vtype (comp, CAL_COMPONENT_EVENT);
+
cal_component_set_uid (comp, key);
+ calobj = cal_component_get_as_string (comp);
coc = GNOME_Evolution_Calendar_CalObjChange__alloc ();
- coc->calobj = CORBA_string_dup (cal_component_get_as_string (comp));
+ coc->calobj = CORBA_string_dup (calobj);
coc->type = GNOME_Evolution_Calendar_DELETED;
be_data->changes = g_list_prepend (be_data->changes, coc);
be_data->change_ids = g_list_prepend (be_data->change_ids, g_strdup (key));
+
+ g_free (calobj);
+ gtk_object_unref (GTK_OBJECT (comp));
}
}