--- old/src/java.base/unix/native/libnet/Inet6AddressImpl.c 2016-05-25 14:20:46.000000000 +0100 +++ new/src/java.base/unix/native/libnet/Inet6AddressImpl.c 2016-05-25 14:20:45.000000000 +0100 @@ -158,7 +158,10 @@ } name = (*env)->NewStringUTF(env, hostname); - CHECK_NULL_RETURN(name, NULL); + if (name == NULL) { + freeifaddrs(ifa); + return NULL; + } /* Iterate over the interfaces, and total up the number of IPv4 and IPv6 * addresses we have. Also keep a count of loopback addresses. We need to