aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/migration.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/migration.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/migration.c')
-rw-r--r--calendar/gui/migration.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index 1cc2a0c169..543a5891cc 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -478,11 +478,13 @@ create_calendar_sources (CalendarComponent *component,
}
if (!*personal_source) {
+ char *primary_calendar = calendar_config_get_primary_calendar ();
+
/* Create the default Person calendar */
ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI);
e_source_group_add_source (*on_this_computer, 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 (source));
@@ -491,7 +493,8 @@ create_calendar_sources (CalendarComponent *component,
selected.next = NULL;
calendar_config_set_calendars_selected (&selected);
}
-
+
+ g_free (primary_calendar);
e_source_set_color (source, 0xBECEDD);
*personal_source = source;
}