From: Ulrich Drepper Date: Sat, 23 Aug 1997 21:52:31 +0000 (+0000) Subject: (__tzset_internal): Fix memory leak when the user specifies a TZ value X-Git-Tag: cvs/glibc-2_0_5pre5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d59621d7d8271fab082bdb11e0f94e92b99a0942;p=thirdparty%2Fglibc.git (__tzset_internal): Fix memory leak when the user specifies a TZ value that uses a default rule file. Do not assume US DST rules when the user specifies that there is no DST. --- diff --git a/time/tzset.c b/time/tzset.c index 42b006e0c17..e0c39552ca0 100644 --- a/time/tzset.c +++ b/time/tzset.c @@ -313,13 +313,18 @@ __tzset_internal (always) { free (old_tz); old_tz = NULL; + free (tzbuf); return; } } } else - /* There is no DST. */ - tz_rules[1].name = tz_rules[0].name; + { + /* There is no DST. */ + tz_rules[1].name = tz_rules[0].name; + free (tzbuf); + return; + } done_names: free (tzbuf);