From 80dd512e6956502055657c1e00ab8feb2c9a3de9 Mon Sep 17 00:00:00 2001 From: Suman Manjunath Date: Fri, 23 May 2008 11:17:20 +0000 Subject: Patch from Milan Crha ** Part of fix for bug #523402 (leak fix, reassign back the old values before freeing) svn path=/trunk/; revision=35533 --- calendar/ChangeLog | 8 ++++++++ calendar/conduits/calendar/calendar-conduit.c | 2 ++ calendar/gui/e-calendar-view.c | 2 ++ 3 files changed, 12 insertions(+) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index b64e4bf7e3..c5d7576e48 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2008-05-23 Milan Crha + + ** Part of fix for bug #523402 + + * gui/e-calendar-view.c: (e_calendar_view_add_event): Do not leak. + * conduits/calendar/calendar-conduit.c: (process_multi_day): + Reassign back the old values before freeing. + 2008-05-22 Matthew Barnes * gui/e-select-names-renderer.c diff --git a/calendar/conduits/calendar/calendar-conduit.c b/calendar/conduits/calendar/calendar-conduit.c index fb6744e851..369fed6104 100644 --- a/calendar/conduits/calendar/calendar-conduit.c +++ b/calendar/conduits/calendar/calendar-conduit.c @@ -709,6 +709,8 @@ process_multi_day (ECalConduitContext *ctxt, ECalChange *ccc, GList **multi_comp ret = FALSE; g_free (new_uid); g_object_unref (clone); + dt_start.value = old_start_value; + dt_end.value = old_end_value; goto cleanup; } diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index 2d35593103..0feebfaa4e 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -364,12 +364,14 @@ e_calendar_view_add_event (ECalendarView *cal_view, ECal *client, time_t dtstart /* set the timezone properly */ e_cal_component_get_dtstart (comp, &dt); + g_free ((char *) dt.tzid); dt.tzid = icaltimezone_get_tzid (default_zone); e_cal_component_set_dtstart (comp, &dt); dt.tzid = NULL; e_cal_component_free_datetime (&dt); e_cal_component_get_dtend (comp, &dt); + g_free ((char *) dt.tzid); dt.tzid = icaltimezone_get_tzid (default_zone); e_cal_component_set_dtend (comp, &dt); dt.tzid = NULL; -- cgit