8211393: Memory leak issue on awt_InputMethod.c
authoritakiguchi
Fri, 19 Oct 2018 15:26:50 +0100
changeset 52263 680ab6b53f6f
parent 52262 7dc391950b19
child 52264 d6c322e900b2
8211393: Memory leak issue on awt_InputMethod.c Reviewed-by: naoto, clanger
src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c
src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c
--- a/src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c	Fri Oct 19 12:50:25 2018 +0530
+++ b/src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c	Fri Oct 19 15:26:50 2018 +0100
@@ -1148,6 +1148,7 @@
                         tmpstyle[cnt] = text->feedback[cnt];
                 (*env)->SetIntArrayRegion(env, style, 0,
                                           text->length, (jint *)tmpstyle);
+                free(tmpstyle);
             }
         }
     }
--- a/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c	Fri Oct 19 12:50:25 2018 +0530
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c	Fri Oct 19 15:26:50 2018 +0100
@@ -1123,6 +1123,7 @@
                         tmpstyle[cnt] = text->feedback[cnt];
                 (*env)->SetIntArrayRegion(env, style, 0,
                                           text->length, (jint *)tmpstyle);
+                free(tmpstyle);
             }
         }
     }