diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index b1adbfc92a3d..9203b695459a 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -339,6 +339,8 @@ res_init() } nserv++; } + if (res) + freeaddrinfo(res); continue; } #ifdef RESOLVSORT