--- a/src/java.base/unix/native/libnet/Inet4AddressImpl.c Wed Jul 18 14:44:04 2018 -0700
+++ b/src/java.base/unix/native/libnet/Inet4AddressImpl.c Thu Jan 18 13:55:26 2018 +0530
@@ -193,7 +193,11 @@
}
setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in *)
(iterator->ai_addr))->sin_addr.s_addr));
+ if ((*env)->ExceptionCheck(env))
+ goto cleanupAndReturn;
setInetAddress_hostName(env, iaObj, host);
+ if ((*env)->ExceptionCheck(env))
+ goto cleanupAndReturn;
(*env)->SetObjectArrayElement(env, ret, i++, iaObj);
iterator = iterator->ai_next;
}