src/java.base/unix/native/libnet/NetworkInterface.c
changeset 52167 b1db57cfe6bd
parent 52157 7593b9b8e8f2
child 53252 e832101ff63c
--- a/src/java.base/unix/native/libnet/NetworkInterface.c	Fri Jun 15 14:19:51 2018 -0700
+++ b/src/java.base/unix/native/libnet/NetworkInterface.c	Wed Jun 20 18:02:22 2018 -0700
@@ -358,7 +358,9 @@
                     int address1 = htonl(
                         ((struct sockaddr_in *)addrP->addr)->sin_addr.s_addr);
                     int address2 = getInetAddress_addr(env, iaObj);
-                    JNU_CHECK_EXCEPTION_RETURN(env, NULL);
+                    if ((*env)->ExceptionCheck(env)) {
+                        goto cleanup;
+                    }
                     if (address1 == address2) {
                         match = JNI_TRUE;
                         break;
@@ -404,6 +406,7 @@
         obj = createNetworkInterface(env, curr);
     }
 
+cleanup:
     // release the interface list
     freeif(ifs);