8161740: [parfait] Memory leak in Java_sun_awt_UNIXToolkit_load_1gtk_1icon of awt_UNIXToolkit.c:132
authorvadim
Tue, 26 Jul 2016 14:19:15 +0300
changeset 40146 e824dfef29db
parent 40145 27daee4932fe
child 40147 92ca3df5b584
8161740: [parfait] Memory leak in Java_sun_awt_UNIXToolkit_load_1gtk_1icon of awt_UNIXToolkit.c:132 Reviewed-by: serb, ssadetsky
jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_UNIXToolkit.c
--- a/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_UNIXToolkit.c	Tue Jul 26 14:18:43 2016 +0300
+++ b/jdk/src/java.desktop/unix/native/libawt_xawt/awt/awt_UNIXToolkit.c	Tue Jul 26 14:19:15 2016 +0300
@@ -129,6 +129,7 @@
         return JNI_FALSE;
     }
     if (!init_method(env, this) ) {
+        free(filename_str);
         return JNI_FALSE;
     }
     (*env)->GetStringUTFRegion(env, filename, 0, len, filename_str);