mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-7135 fix a memory leak in timezone.cpp on Windows
X-SVN-Rev: 26616
This commit is contained in:
parent
df6548d8bf
commit
1dc8949de0
1 changed files with 5 additions and 0 deletions
|
@ -578,6 +578,11 @@ TimeZone::initDefault()
|
|||
hostStrID.truncate(hostStrID.length()-1);
|
||||
default_zone = createSystemTimeZone(hostStrID);
|
||||
|
||||
#ifdef U_WINDOWS
|
||||
// hostID points to a heap-allocated location on Windows.
|
||||
uprv_free(const_cast<char *>(hostID));
|
||||
#endif
|
||||
|
||||
int32_t hostIDLen = hostStrID.length();
|
||||
if (default_zone != NULL && rawOffset != default_zone->getRawOffset()
|
||||
&& (3 <= hostIDLen && hostIDLen <= 4))
|
||||
|
|
Loading…
Add table
Reference in a new issue