From: Rich Felker Date: Sat, 2 Feb 2013 06:32:12 +0000 (-0500) Subject: fix memory leak due to double call to getaddrinfo in gethostbyname* X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=b0302863a36ef6ad24bd25e3ef4df74b9a56980d;hp=70b584bc9467ce939c73898212c17be1ab7e39af fix memory leak due to double call to getaddrinfo in gethostbyname* --- diff --git a/src/network/gethostbyname2_r.c b/src/network/gethostbyname2_r.c index 49e4e531..0dc6dc00 100644 --- a/src/network/gethostbyname2_r.c +++ b/src/network/gethostbyname2_r.c @@ -30,7 +30,6 @@ int gethostbyname2_r(const char *name, int af, buflen -= sizeof(char *)-i; } - getaddrinfo(name, 0, &hint, &ai); switch (getaddrinfo(name, 0, &hint, &ai)) { case EAI_NONAME: *err = HOST_NOT_FOUND;