From 9a797017a1123f14d77af3b2b2aa0df71f944136 Mon Sep 17 00:00:00 2001 From: Harish Krishnaswamy Date: Sun, 3 Dec 2006 17:40:56 +0000 Subject: Fix leaks of 'location' at various exit points. 2006-12-03 Harish Krishnaswamy * gui/calendar-config.c: (calendar_config_get_icaltimezone): Fix leaks of 'location' at various exit points. svn path=/trunk/; revision=33035 --- calendar/ChangeLog | 6 ++++++ calendar/gui/calendar-config.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 5e70bb78e5..22c2d4f89a 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2006-12-03 Harish Krishnaswamy + + * gui/calendar-config.c: + (calendar_config_get_icaltimezone): Fix leaks of + 'location' at various exit points. + 2006-11-28 Srinivasa Ragavan Added support to print/preview from Calendar Editor. diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 2441b71010..6ec6386a79 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -228,6 +228,7 @@ calendar_config_get_icaltimezone (void) if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) { + g_free (location); return zone; } @@ -245,7 +246,7 @@ calendar_config_get_icaltimezone (void) custom_zones = g_hash_table_new (g_str_hash, g_str_equal); } else if ((st_zone = g_hash_table_lookup (custom_zones, n_tzid))) { g_free (n_tzid); - + g_free (location); return st_zone; } @@ -255,7 +256,7 @@ calendar_config_get_icaltimezone (void) if (!s_comp) { g_free (n_tzid); icalcomponent_free (zone_comp); - + g_free (location); return zone; } -- cgit v1.2.3