diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 932048fdadbd..d6def63446fa 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -2246,8 +2246,8 @@ _yp_getaddrinfo(rv, cb_data, ap) while (cur && cur->ai_next) cur = cur->ai_next; } + free(ypbuf); } - free(ypbuf); } /* ipnodes.byname can hold both IPv4/v6 */