From e5d1afdc538dbb0d298ef6c8352d165384c42930 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sun, 27 Oct 2002 15:58:25 +0000 Subject: [PATCH] Free the location if it's set. Otherwise one copy of the location of each * src/libical/icaltimezone.c (icaltimezone_get_vtimezone_properties): Free the location if it's set. Otherwise one copy of the location of each built-in timezone we use gets leaked. svn path=/trunk/; revision=18447 --- libical/ChangeLog | 7 +++++++ libical/src/libical/icaltimezone.c | 3 +++ 2 files changed, 10 insertions(+) diff --git a/libical/ChangeLog b/libical/ChangeLog index 97412a7fa7..87f0dc4436 100644 --- a/libical/ChangeLog +++ b/libical/ChangeLog @@ -1,3 +1,10 @@ +2002-10-25 Dan Winship + + * src/libical/icaltimezone.c + (icaltimezone_get_vtimezone_properties): Free the location if it's + set. Otherwise one copy of the location of each built-in timezone + we use gets leaked. + 2002-10-15 Rodrigo Moya Fixes #25153 diff --git a/libical/src/libical/icaltimezone.c b/libical/src/libical/icaltimezone.c index 6303bec2f1..8841584d9e 100644 --- a/libical/src/libical/icaltimezone.c +++ b/libical/src/libical/icaltimezone.c @@ -267,6 +267,9 @@ icaltimezone_get_vtimezone_properties (icaltimezone *zone, if (!tzid) return 0; + if (zone->location) + free (zone->location); + zone->tzid = strdup (tzid); zone->component = component; zone->location = icaltimezone_get_location_from_vtimezone (component);