Modified ical_dezonify() again. It seems that there
authorArt Cancro <ajc@citadel.org>
Wed, 23 Jan 2008 17:35:26 +0000 (17:35 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 23 Jan 2008 17:35:26 +0000 (17:35 +0000)
is never a need to free the icaltimezone, as it will always be one
of three things:
1. A built-in timezone (memory belongs to libical)
2. Hardcoded UTC timezone (memory belongs to libical)
3. A supplied timezone from another component (memory belongs to caller)
Removed the call to icaltimezone_free().

webcit/ical_dezonify.c

index 24e8d88c2336e6b2751da82cf095e206f414b4e4..2b9d6caf72265d916b59f211287a9e3cc550fcdf 100644 (file)
@@ -124,13 +124,9 @@ void ical_dezonify_backend(icalcomponent *cal,
                }
 
                if (t == NULL) {
-                       t = icaltimezone_copy(get_default_icaltimezone());
+                       t = get_default_icaltimezone();
                }
-               icaltimezone_convert_time(&TheTime,
-                                         t,
-                                         icaltimezone_get_utc_timezone()
-                       );
-               icaltimezone_free (t, 1);
+               icaltimezone_convert_time(&TheTime, t, icaltimezone_get_utc_timezone());
                TheTime.is_utc = 1;
        }