mirror of git://git.musl-libc.org/musl
fix memory leak due to double call to getaddrinfo in gethostbyname*
This commit is contained in:
parent
70b584bc94
commit
b0302863a3
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue