aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/memos-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/memos-component.c
parent0aa26a1e49d1595f0e250982dd3e13f82323efbc (diff)
downloadgsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.tar
gsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.tar.gz
gsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.tar.bz2
gsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.tar.lz
gsoc2013-evolution-7193b99f7ae278d58bc06c0322d8c12eddaf2df6.tar.xz
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/memos-component.c')
-rw-r--r--calendar/gui/memos-component.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c
index e2ece2d215..40bb509494 100644
--- a/calendar/gui/memos-component.c
+++ b/calendar/gui/memos-component.c
@@ -204,11 +204,14 @@ ensure_sources (MemosComponent *component)
}
if (!personal_source) {
+ GSList *memos_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_memos () && !calendar_config_get_memos_selected ()) {
+ memos_selected = calendar_config_get_memos_selected ();
+
+ if (!calendar_config_get_primary_memos () && !memos_selected) {
GSList selected;
calendar_config_set_primary_memos (e_source_peek_uid (source));
@@ -218,6 +221,11 @@ ensure_sources (MemosComponent *component)
calendar_config_set_memos_selected (&selected);
}
+ if (memos_selected) {
+ g_slist_foreach (memos_selected, (GFunc) g_free, NULL);
+ g_slist_free (memos_selected);
+ }
+
e_source_set_color_spec (source, "#BECEDD");
personal_source = source;
}