changeset 57985:ea93d6a9f720

8230856: Java_java_net_NetworkInterface_getByName0 on unix misses ReleaseStringUTFChars in early return Reviewed-by: dfuchs, stuefe, vtewari
author mbaesken
date Wed, 11 Sep 2019 16:13:05 +0200
parents fa0514bdc09b
children b2a4b22f8cf2
files src/java.base/unix/native/libnet/NetworkInterface.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/unix/native/libnet/NetworkInterface.c	Wed Sep 11 16:54:53 2019 +0200
+++ b/src/java.base/unix/native/libnet/NetworkInterface.c	Wed Sep 11 16:13:05 2019 +0200
@@ -239,6 +239,7 @@
 
     ifs = enumInterfaces(env);
     if (ifs == NULL) {
+        (*env)->ReleaseStringUTFChars(env, name, name_utf);
         return NULL;
     }