--- a/src/java.base/unix/native/libnet/Inet6AddressImpl.c Wed Jul 18 14:44:04 2018 -0700
+++ b/src/java.base/unix/native/libnet/Inet6AddressImpl.c Thu Jan 18 13:55:26 2018 +0530
@@ -198,6 +198,8 @@
return NULL;
}
setInetAddress_hostName(env, o, name);
+ if ((*env)->ExceptionCheck(env))
+ goto done;
(*env)->SetObjectArrayElement(env, result, index, o);
(*env)->DeleteLocalRef(env, o);
}
@@ -355,7 +357,11 @@
goto cleanupAndReturn;
}
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, (inetIndex | originalIndex), iaObj);
inetIndex++;
} else if (iterator->ai_family == AF_INET6) {
@@ -376,6 +382,8 @@
setInet6Address_scopeid(env, iaObj, scope);
}
setInetAddress_hostName(env, iaObj, host);
+ if ((*env)->ExceptionCheck(env))
+ goto cleanupAndReturn;
(*env)->SetObjectArrayElement(env, ret, (inet6Index | originalIndex), iaObj);
inet6Index++;
}