mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-06 14:10:30 +08:00
(__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.
This commit is contained in:
parent
f1cc48bbec
commit
d59621d7d8
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user