aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-01-25 22:10:07 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-01-25 22:10:07 +0800
commit34da45d5d6f03a24f32edf8a41a783ad489f9296 (patch)
treee8c479e2cd57bc82eae49205ef9accb0d953a479 /plugins
parentc4046c56365033ebc17c21f4bda6411ffe5bf1fc (diff)
downloadgsoc2013-evolution-34da45d5d6f03a24f32edf8a41a783ad489f9296.tar
gsoc2013-evolution-34da45d5d6f03a24f32edf8a41a783ad489f9296.tar.gz
gsoc2013-evolution-34da45d5d6f03a24f32edf8a41a783ad489f9296.tar.bz2
gsoc2013-evolution-34da45d5d6f03a24f32edf8a41a783ad489f9296.tar.lz
gsoc2013-evolution-34da45d5d6f03a24f32edf8a41a783ad489f9296.tar.xz
gsoc2013-evolution-34da45d5d6f03a24f32edf8a41a783ad489f9296.tar.zst
gsoc2013-evolution-34da45d5d6f03a24f32edf8a41a783ad489f9296.zip
** Fix for bug #475781
2008-01-25 Milan Crha <mcrha@redhat.com> ** Fix for bug #475781 * plugins/save-calendar/csv-format.c: (do_save_calendar_csv): * plugins/save-calendar/rdf-format.c: (do_save_calendar_rdf): * plugins/itip-formatter/itip-formatter.c: (format_itip_object): * calendar/gui/dialogs/recurrence-page.c: (fill_ending_date), (recurrence_page_fill_widgets): * calendar/gui/dialogs/memo-page.c: (memo_page_fill_widgets): * calendar/gui/e-day-view.c: 2*(e_day_view_finish_long_event_resize), 2*(e_day_view_on_editing_stopped): * calendar/gui/itip-utils.c: (comp_compliant), (reply_to_calendar_comp): * calendar/gui/e-week-view.c: (e_week_view_on_editing_stopped): * calendar/gui/e-calendar-view.c: (e_calendar_view_add_event), (e_calendar_view_get_tooltips): * calendar/gui/e-cal-component-preview.c: (write_html): * calendar/gui/e-cal-component-memo-preview.c: (write_html): * calendar/gui/e-cal-model.c: (add_instance_cb): Fix memory leaks around ECalComponentDateTime. svn path=/trunk/; revision=34895
Diffstat (limited to 'plugins')
-rw-r--r--plugins/itip-formatter/ChangeLog7
-rw-r--r--plugins/itip-formatter/itip-formatter.c12
-rw-r--r--plugins/save-calendar/ChangeLog8
-rw-r--r--plugins/save-calendar/csv-format.c9
-rw-r--r--plugins/save-calendar/rdf-format.c11
5 files changed, 28 insertions, 19 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;
diff --git a/plugins/save-calendar/ChangeLog b/plugins/save-calendar/ChangeLog
index 635d326a1e..a498f0d995 100644
--- a/plugins/save-calendar/ChangeLog
+++ b/plugins/save-calendar/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-25 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #475781
+
+ * csv-format.c: (do_save_calendar_csv):
+ * rdf-format.c: (do_save_calendar_rdf):
+ Fix memory leaks around ECalComponentDateTime.
+
2007-11-11 Gilles Dartiguelongue <gdartigu@svn.gnome.org>
** Fix bug #495872
diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c
index d4b46058a0..e26b758cd4 100644
--- a/plugins/save-calendar/csv-format.c
+++ b/plugins/save-calendar/csv-format.c
@@ -462,18 +462,15 @@ do_save_calendar_csv (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
e_cal_component_get_dtstart (comp, &temp_dt);
line = add_time_to_csv (line, temp_dt.value ? temp_dt.value : NULL, config);
- if (temp_dt.value)
- e_cal_component_free_datetime (&temp_dt);
+ e_cal_component_free_datetime (&temp_dt);
e_cal_component_get_dtend (comp, &temp_dt);
line = add_time_to_csv (line, temp_dt.value ? temp_dt.value : NULL, config);
- if (temp_dt.value)
- e_cal_component_free_datetime (&temp_dt);
+ e_cal_component_free_datetime (&temp_dt);
e_cal_component_get_due (comp, &temp_dt);
line = add_time_to_csv (line, temp_dt.value ? temp_dt.value : NULL, config);
- if (temp_dt.value)
- e_cal_component_free_datetime (&temp_dt);
+ e_cal_component_free_datetime (&temp_dt);
e_cal_component_get_percent (comp, &temp_int);
line = add_nummeric_to_csv (line, temp_int, config);
diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c
index 768028b811..445dbd6cbf 100644
--- a/plugins/save-calendar/rdf-format.c
+++ b/plugins/save-calendar/rdf-format.c
@@ -320,19 +320,16 @@ do_save_calendar_rdf (FormatHandler *handler, EPlugin *ep, ECalPopupTargetSource
e_cal_component_free_text_list (temp_list);
e_cal_component_get_dtstart (comp, &temp_dt);
- add_time_to_rdf (node, "dtstart", temp_dt.value ? temp_dt.value : NULL);
- if (temp_dt.value)
- e_cal_component_free_datetime (&temp_dt);
+ add_time_to_rdf (node, "dtstart", temp_dt.value ? temp_dt.value : NULL);
+ e_cal_component_free_datetime (&temp_dt);
e_cal_component_get_dtend (comp, &temp_dt);
add_time_to_rdf (node, "dtend", temp_dt.value ? temp_dt.value : NULL);
- if (temp_dt.value)
- e_cal_component_free_datetime (&temp_dt);
+ e_cal_component_free_datetime (&temp_dt);
e_cal_component_get_due (comp, &temp_dt);
add_time_to_rdf (node, "due", temp_dt.value ? temp_dt.value : NULL);
- if (temp_dt.value)
- e_cal_component_free_datetime (&temp_dt);
+ e_cal_component_free_datetime (&temp_dt);
e_cal_component_get_percent (comp, &temp_int);
add_nummeric_to_rdf (node, "percentComplete", temp_int);