changeset 52284:680ab6b53f6f

8211393: Memory leak issue on awt_InputMethod.c Reviewed-by: naoto, clanger
author itakiguchi
date Fri, 19 Oct 2018 15:26:50 +0100
parents 7dc391950b19
children d6c322e900b2
files src/java.desktop/aix/native/libawt_xawt/awt/awt_InputMethod.c src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
             }
         }
     }