changeset 6783:c5fbbced812e

8022584: Memory leak in some NetworkInterface methods Reviewed-by: alanb, dholmes, chegar, michaelm
author igerasim
date Thu, 24 Oct 2013 22:03:05 +0400
parents ffe251aaae42
children 01f4ed4d889b
files src/solaris/native/java/net/NetworkInterface.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/net/NetworkInterface.c	Mon Oct 21 14:39:20 2013 -0700
+++ b/src/solaris/native/java/net/NetworkInterface.c	Thu Oct 24 22:03:05 2013 +0400
@@ -559,11 +559,9 @@
 
     if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
         (*env)->ReleaseStringUTFChars(env, name, name_utf);
-         return -1;
+        return -1;
     }
 
-    name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
-
     ret = getFlags(sock, name_utf, &flags);
 
     close(sock);