diff --git a/src/solaris/native/java/net/Inet6AddressImpl.c b/src/solaris/native/java/net/Inet6AddressImpl.c index 9850bb32c4867eea16eff50b0ef069bd1f2deddf..da510a28c9f37344182eb5acd42c164439e4d8b9 100644 --- a/src/solaris/native/java/net/Inet6AddressImpl.c +++ b/src/solaris/native/java/net/Inet6AddressImpl.c @@ -555,6 +555,7 @@ Java_java_net_Inet6AddressImpl_getHostByAddr(JNIEnv *env, jobject this, if (!error) { ret = (*env)->NewStringUTF(env, host); + CHECK_NULL(ret); } #endif /* AF_INET6 */ diff --git a/src/windows/native/java/net/Inet6AddressImpl.c b/src/windows/native/java/net/Inet6AddressImpl.c index 2ab1ded0d0a5a6c290b558a8d28a01af68c4aacb..c9e48bec48c6bd7d0f1a17c578f8c3b5585155b0 100644 --- a/src/windows/native/java/net/Inet6AddressImpl.c +++ b/src/windows/native/java/net/Inet6AddressImpl.c @@ -349,6 +349,7 @@ Java_java_net_Inet6AddressImpl_getHostByAddr(JNIEnv *env, jobject this, if (!error) { ret = (*env)->NewStringUTF(env, host); + CHECK_NULL(ret); } if (ret == NULL) {