diff options
Diffstat (limited to 'plugins/itip-formatter')
-rw-r--r-- | plugins/itip-formatter/ChangeLog | 7 | ||||
-rw-r--r-- | plugins/itip-formatter/itip-formatter.c | 12 |
2 files changed, 13 insertions, 6 deletions
diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog index cc9f039bfd..8b8ccec746 100644 --- a/plugins/itip-formatter/ChangeLog +++ b/plugins/itip-formatter/ChangeLog @@ -1,3 +1,10 @@ +2008-01-25 Milan Crha <mcrha@redhat.com> + + ** Fix for bug #475781 + + * itip-formatter.c: (format_itip_object): + Fix memory leaks around ECalComponentDateTime. + 2007-12-20 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #362638 diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index bd62118d40..1d6e282712 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -2082,16 +2082,16 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject /* Set the recurrence id */ if (check_is_instance (icalcomp) && datetime.value) { ECalComponentRange *recur_id; - - *datetime.value = icaltime_convert_to_zone (*datetime.value, to_zone); - datetime.tzid = icaltimezone_get_tzid (to_zone); + struct icaltimetype icaltime = icaltime_convert_to_zone (*datetime.value, to_zone); recur_id = g_new0 (ECalComponentRange, 1); recur_id->type = E_CAL_COMPONENT_RANGE_SINGLE; - recur_id->datetime = datetime; + recur_id->datetime.value = &icaltime; + recur_id->datetime.tzid = icaltimezone_get_tzid (to_zone); e_cal_component_set_recurid (pitip->comp, recur_id); - } else - e_cal_component_free_datetime (&datetime); + g_free (recur_id); /* it's ok to call g_free here */ + } + e_cal_component_free_datetime (&datetime); e_cal_component_get_dtend (pitip->comp, &datetime); pitip->end_time = 0; |