aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/save-calendar
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/save-calendar')
-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
3 files changed, 15 insertions, 13 deletions
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);