# HG changeset patch # User aefimov # Date 1440517232 -10800 # Node ID 51ea96c8ae89aef2b93e39b1687423235c9bebac # Parent de3cc06aec567a2c8df61e1123458bab3a37f502 8133830: [solaris] Fix for potential memory leak in TimeZone_md.c, function findJavaTZ_md() Reviewed-by: andrew, goetz, okutsu Contributed-by: christoph.langer@sap.com diff -r de3cc06aec56 -r 51ea96c8ae89 jdk/src/java.base/unix/native/libjava/TimeZone_md.c --- a/jdk/src/java.base/unix/native/libjava/TimeZone_md.c Tue Aug 25 20:21:53 2015 +0530 +++ b/jdk/src/java.base/unix/native/libjava/TimeZone_md.c Tue Aug 25 18:40:32 2015 +0300 @@ -685,6 +685,9 @@ #ifdef __solaris__ if (tz != NULL && strcmp(tz, "localtime") == 0) { tz = getSolarisDefaultZoneID(); + if (freetz != NULL) { + free((void *) freetz); + } freetz = tz; } #endif