fix the bad bad bad mess this caused on name resolves returning more than
one name... Reported by James Bursa
This commit is contained in:
parent
25d2a27c64
commit
8629620b1c
@ -33,10 +33,8 @@ void ares_free_hostent(struct hostent *host)
|
|||||||
for (p = host->h_aliases; *p; p++)
|
for (p = host->h_aliases; *p; p++)
|
||||||
free(*p);
|
free(*p);
|
||||||
free(host->h_aliases);
|
free(host->h_aliases);
|
||||||
for(p = host->h_addr_list; *p; p++)
|
free(host->h_addr_list[0]); /* no matter if there is one or many entries,
|
||||||
{
|
there is only one malloc for all of them */
|
||||||
free(*p);
|
|
||||||
}
|
|
||||||
free(host->h_addr_list);
|
free(host->h_addr_list);
|
||||||
free(host);
|
free(host);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user