diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-08-23 21:52:31 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-08-23 21:52:31 +0000 |
commit | d59621d7d8271fab082bdb11e0f94e92b99a0942 (patch) | |
tree | 1f54cab177cd3f0c64d6c890af4d2128ef696531 | |
parent | f1cc48bbec46dd0ea5e131d4d6d62254bf7aab4d (diff) | |
download | glibc-d59621d7d8271fab082bdb11e0f94e92b99a0942.tar glibc-d59621d7d8271fab082bdb11e0f94e92b99a0942.tar.gz glibc-d59621d7d8271fab082bdb11e0f94e92b99a0942.tar.bz2 glibc-d59621d7d8271fab082bdb11e0f94e92b99a0942.zip |
(__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.
-rw-r--r-- | time/tzset.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/time/tzset.c b/time/tzset.c index 42b006e0c1..e0c39552ca 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); |