aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-component.c
diff options
context:
space:
mode:
authorHiroyuki Ikezoe <poincare@ikezoe.net>2007-07-26 20:37:57 +0800
committerHiroyuki Ikezoe <hiikezoe@src.gnome.org>2007-07-26 20:37:57 +0800
commit7193b99f7ae278d58bc06c0322d8c12eddaf2df6 (patch)
treefc69a4b1a5d3b18a4707c6c775983d490399d42b /calendar/gui/tasks-component.c
parent0aa26a1e49d1595f0e250982dd3e13f82323efbc (diff)
downloadgsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.tar.gz
gsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.tar.zst
gsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.zip
Plugged memory leaks.
2007-07-26 Hiroyuki Ikezoe <poincare@ikezoe.net> * gui/alarm-notify/config-data.c, gui/tasks-component.c, gui/calendar-component.c, gui/memos-component.c: Plugged memory leaks. svn path=/trunk/; revision=33852
Diffstat (limited to 'calendar/gui/tasks-component.c')
-rw-r--r--calendar/gui/tasks-component.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 3965517dde..fa2485e7ea 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -200,11 +200,14 @@ ensure_sources (TasksComponent *component)
}
if (!personal_source) {
+ GSList *tasks_selected;
/* Create the default Person addressbook */
ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, source, -1);
- if (!calendar_config_get_primary_tasks () && !calendar_config_get_tasks_selected ()) {
+ tasks_selected = calendar_config_get_tasks_selected ();
+
+ if (!calendar_config_get_primary_tasks () && !tasks_selected) {
GSList selected;
calendar_config_set_primary_tasks (e_source_peek_uid (source));
@@ -214,6 +217,11 @@ ensure_sources (TasksComponent *component)
calendar_config_set_tasks_selected (&selected);
}
+ if (tasks_selected) {
+ g_slist_foreach (tasks_selected, (GFunc) g_free, NULL);
+ g_slist_free (tasks_selected);
+ }
+
e_source_set_color_spec (source, "#BECEDD");
personal_source = source;
}