projects
/
platform
/
upstream
/
c-ares.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc5a460
)
fix the bad bad bad mess this caused on name resolves returning more than
author
Daniel Stenberg
<daniel@haxx.se>
Mon, 4 Jun 2007 21:04:14 +0000
(21:04 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 4 Jun 2007 21:04:14 +0000
(21:04 +0000)
one name... Reported by James Bursa
ares_free_hostent.c
patch
|
blob
|
history
diff --git
a/ares_free_hostent.c
b/ares_free_hostent.c
index
d6cf51f
..
d766795
100644
(file)
--- a/
ares_free_hostent.c
+++ b/
ares_free_hostent.c
@@
-33,10
+33,8
@@
void ares_free_hostent(struct hostent *host)
for (p = host->h_aliases; *p; p++)
free(*p);
free(host->h_aliases);
- for(p = host->h_addr_list; *p; p++)
- {
- free(*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(host->h_addr_list);
free(host);
}