aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2006-08-22 18:24:31 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2006-08-22 18:24:31 +0800
commit9de0b61f706f8ec51cd60059fbb04c5cda3c235c (patch)
treec9c6dd2d3e6e1f3dfddc6ac165289ac405c9ca62 /calendar/gui/calendar-component.c
parent41a4ef665287d566fbb4de0d96ec148a0750bf24 (diff)
downloadgsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.gz
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.bz2
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.lz
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.xz
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.tar.zst
gsoc2013-evolution-9de0b61f706f8ec51cd60059fbb04c5cda3c235c.zip
Plug a leak. Same thing here.
2006-08-22 Kjartan Maraas <kmaraas@gnome.org> * gui/calendar-component.c (ensure_sources): Plug a leak. * gui/migration.c (create_calendar_sources): Same thing here. svn path=/trunk/; revision=32625
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index c4c48f22fb..271f0845fd 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -235,11 +235,13 @@ ensure_sources (CalendarComponent *component)
}
if (!personal_source) {
+ char *primary_calendar = calendar_config_get_primary_calendar();
+
/* Create the default Person addressbook */
personal_source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (on_this_computer, personal_source, -1);
-
- if (!calendar_config_get_primary_calendar () && !calendar_config_get_calendars_selected ()) {
+
+ if (!primary_calendar && !calendar_config_get_calendars_selected ()) {
GSList selected;
calendar_config_set_primary_calendar (e_source_peek_uid (personal_source));
@@ -248,7 +250,8 @@ ensure_sources (CalendarComponent *component)
selected.next = NULL;
calendar_config_set_calendars_selected (&selected);
}
-
+
+ g_free (primary_calendar);
e_source_set_color (personal_source, 0xBECEDD);
}