aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/config-data.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/alarm-notify/config-data.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/alarm-notify/config-data.c')
-rw-r--r--calendar/gui/alarm-notify/config-data.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c
index 28b3730e9e..9ddac9f3c1 100644
--- a/calendar/gui/alarm-notify/config-data.c
+++ b/calendar/gui/alarm-notify/config-data.c
@@ -111,8 +111,11 @@ config_data_get_calendars (const char *key)
NULL);
cal_sources = e_source_list_new_for_gconf (conf_client, key);
- if (cal_sources && g_slist_length (gconf_list))
+ if (cal_sources && g_slist_length (gconf_list)) {
+ g_slist_foreach (gconf_list, (GFunc) g_free, NULL);
+ g_slist_free (gconf_list);
return cal_sources;
+ }
state = gconf_client_get_bool (conf_client,
"/apps/evolution/calendar/notify/notify_with_tray",
@@ -133,8 +136,17 @@ config_data_get_calendars (const char *key)
source,
NULL);
cal_sources = e_source_list_new_for_gconf (conf_client, key);
+
+ if (source) {
+ g_slist_foreach (source, (GFunc) g_free, NULL);
+ g_slist_free (source);
+ }
+ }
+
+ if (gconf_list) {
+ g_slist_foreach (gconf_list, (GFunc) g_free, NULL);
+ g_slist_free (gconf_list);
}
-
return cal_sources;
@@ -171,6 +183,11 @@ config_data_replace_string_list (const char *key,
break;
}
}
+
+ if (source) {
+ g_slist_foreach (source, (GFunc) g_free, NULL);
+ g_slist_free (source);
+ }
}
GConfClient *