changeset 13337:f1f6a6508eb1

8199161: Better interface enumeration Reviewed-by: igerasim, mschoene, michaelm, rhalade
author igerasim
date Wed, 15 Aug 2018 12:13:20 -0700
parents b965edac64ad
children 776a933c85ea
files src/windows/native/java/net/NetworkInterface.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/native/java/net/NetworkInterface.c	Wed Aug 15 12:12:16 2018 -0700
+++ b/src/windows/native/java/net/NetworkInterface.c	Wed Aug 15 12:13:20 2018 -0700
@@ -861,6 +861,7 @@
     /* allocate a NetworkInterface array */
     netIFArr = (*env)->NewObjectArray(env, count, cls, NULL);
     if (netIFArr == NULL) {
+        free_netif(ifList);
         return NULL;
     }
 
@@ -875,6 +876,7 @@
 
         netifObj = createNetworkInterface(env, curr, -1, NULL);
         if (netifObj == NULL) {
+            free_netif(ifList);
             return NULL;
         }