fix memory leak due to double call to getaddrinfo in gethostbyname*

This commit is contained in:
Rich Felker 2013-02-02 01:32:12 -05:00
parent 70b584bc94
commit b0302863a3
1 changed files with 0 additions and 1 deletions

View File

@ -30,7 +30,6 @@ int gethostbyname2_r(const char *name, int af,
buflen -= sizeof(char *)-i; buflen -= sizeof(char *)-i;
} }
getaddrinfo(name, 0, &hint, &ai);
switch (getaddrinfo(name, 0, &hint, &ai)) { switch (getaddrinfo(name, 0, &hint, &ai)) {
case EAI_NONAME: case EAI_NONAME:
*err = HOST_NOT_FOUND; *err = HOST_NOT_FOUND;