8133830: [solaris] Fix for potential memory leak in TimeZone_md.c, function findJavaTZ_md()

Reviewed-by: andrew, goetz, okutsu
This commit is contained in:
Christoph Langer 2015-08-25 18:40:32 +03:00 committed by Aleksei Efimov
parent 7e32d7a8b5
commit 739a00037e

View File

@ -685,6 +685,9 @@ findJavaTZ_md(const char *java_home_dir)
#ifdef __solaris__
if (tz != NULL && strcmp(tz, "localtime") == 0) {
tz = getSolarisDefaultZoneID();
if (freetz != NULL) {
free((void *) freetz);
}
freetz = tz;
}
#endif