aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamon Chaplin <damon@ximian.com>2001-08-07 09:57:09 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-08-07 09:57:09 +0800
commitaf43e15005c137bc8ffbca4d3e0622bb4822fc8c (patch)
tree56b6bf246213717e61e044dab67f7a032febf1aa
parent7aeeb5f282e3ab145d75489c8d93dc7fd49e9557 (diff)
downloadgsoc2013-evolution-af43e15005c137bc8ffbca4d3e0622bb4822fc8c.tar
gsoc2013-evolution-af43e15005c137bc8ffbca4d3e0622bb4822fc8c.tar.gz
gsoc2013-evolution-af43e15005c137bc8ffbca4d3e0622bb4822fc8c.tar.bz2
gsoc2013-evolution-af43e15005c137bc8ffbca4d3e0622bb4822fc8c.tar.lz
gsoc2013-evolution-af43e15005c137bc8ffbca4d3e0622bb4822fc8c.tar.xz
gsoc2013-evolution-af43e15005c137bc8ffbca4d3e0622bb4822fc8c.tar.zst
gsoc2013-evolution-af43e15005c137bc8ffbca4d3e0622bb4822fc8c.zip
free the CalComponentDateTime and icaltimetype values after finishing with
2001-08-06 Damon Chaplin <damon@ximian.com> * e-summary-tasks.c (sort_uids): (get_todays_uids): (generate_html): * e-summary-calendar.c (sort_uids): free the CalComponentDateTime and icaltimetype values after finishing with them. svn path=/trunk/; revision=11720
-rw-r--r--my-evolution/ChangeLog8
-rw-r--r--my-evolution/e-summary-calendar.c12
-rw-r--r--my-evolution/e-summary-tasks.c10
3 files changed, 28 insertions, 2 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog
index 7927652c61..bdb00558e1 100644
--- a/my-evolution/ChangeLog
+++ b/my-evolution/ChangeLog
@@ -1,3 +1,11 @@
+2001-08-06 Damon Chaplin <damon@ximian.com>
+
+ * e-summary-tasks.c (sort_uids):
+ (get_todays_uids):
+ (generate_html):
+ * e-summary-calendar.c (sort_uids): free the CalComponentDateTime
+ and icaltimetype values after finishing with them.
+
2001-08-03 Jason Leach <jleach@ximian.com>
* e-summary-mail.c (update_folder_cb): Callback for the
diff --git a/my-evolution/e-summary-calendar.c b/my-evolution/e-summary-calendar.c
index 442bf1db6e..55a8bb40ef 100644
--- a/my-evolution/e-summary-calendar.c
+++ b/my-evolution/e-summary-calendar.c
@@ -118,6 +118,7 @@ sort_uids (gconstpointer a,
ESummaryCalendar *calendar = summary->calendar;
CalClientGetStatus status;
CalComponentDateTime start_a, start_b;
+ int retval;
/* a after b then return > 0 */
@@ -132,7 +133,12 @@ sort_uids (gconstpointer a,
cal_component_get_dtstart (comp_a, &start_a);
cal_component_get_dtstart (comp_b, &start_b);
- return icaltime_compare (*start_a.value, *start_b.value);
+ retval = icaltime_compare (*start_a.value, *start_b.value);
+
+ cal_component_free_datetime (&start_a);
+ cal_component_free_datetime (&start_b);
+
+ return retval;
}
static gboolean
@@ -211,11 +217,15 @@ generate_html (gpointer data)
}
cal_component_get_summary (comp, &text);
+
cal_component_get_dtstart (comp, &start);
cal_component_get_dtend (comp, &end);
start_t = icaltime_as_timet (*start.value);
+ cal_component_free_datetime (&start);
+ cal_component_free_datetime (&end);
+
start_str = g_new (char, 20);
start_tm = localtime (&start_t);
dt = start_t - t;
diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c
index d691b58e1e..22428aa5ce 100644
--- a/my-evolution/e-summary-tasks.c
+++ b/my-evolution/e-summary-tasks.c
@@ -117,6 +117,7 @@ sort_uids (gconstpointer a,
CalClient *client = user_data;
CalClientGetStatus status;
CalComponentDateTime start_a, start_b;
+ int retval;
/* a after b then return > 0 */
@@ -131,7 +132,12 @@ sort_uids (gconstpointer a,
cal_component_get_dtstart (comp_a, &start_a);
cal_component_get_dtstart (comp_b, &start_b);
- return icaltime_compare (*start_a.value, *start_b.value);
+ retval = icaltime_compare (*start_a.value, *start_b.value);
+
+ cal_component_free_datetime (&start_a);
+ cal_component_free_datetime (&start_b);
+
+ return retval;
}
static GList *
@@ -165,6 +171,7 @@ get_todays_uids (CalClient *client,
today = g_list_append (today, g_strdup (uid));
}
}
+ cal_component_free_datetime (&end);
}
if (today == NULL) {
@@ -248,6 +255,7 @@ generate_html (gpointer data)
"alt=\"\" width=\"16\" height=\"16\"> &#160; "
"<font size=\"-1\"><strike><a href=\"evolution:/local/Tasks\">%s</a></strike></font><br>",
text.value);
+ cal_component_free_icaltimetype (completed);
}
g_string_append (string, tmp);