diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c index 86df4978257..92cbd208c6e 100644 --- a/src/java.base/unix/native/libnet/net_util_md.c +++ b/src/java.base/unix/native/libnet/net_util_md.c @@ -584,6 +584,8 @@ static void initLoopbackRoutes() { if (loRoutesTemp == 0) { free(loRoutes); + loRoutes = NULL; + nRoutes = 0; fclose (f); return; }