Explorar o código

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

Rich Felker %!s(int64=12) %!d(string=hai) anos
pai
achega
b0302863a3
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  1. 0 1
      src/network/gethostbyname2_r.c

+ 0 - 1
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;