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:
e67edcd
)
ares_free_hostent(NULL) should be a noop
author
Jakub Hrozek
<jhrozek@redhat.com>
Mon, 13 Jun 2011 16:21:08 +0000
(18:21 +0200)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 13 Jun 2011 20:47:35 +0000
(22:47 +0200)
ares_free_hostent.c
patch
|
blob
|
history
diff --git
a/ares_free_hostent.c
b/ares_free_hostent.c
index b124560d86a1b7522e0de2c7cb59964f1ce16982..349d379af3a0609c259168b1d3cb1b62d8a4c65d 100644
(file)
--- a/
ares_free_hostent.c
+++ b/
ares_free_hostent.c
@@
-28,6
+28,9
@@
void ares_free_hostent(struct hostent *host)
{
char **p;
+ if (!host)
+ return;
+
free((char *)(host->h_name));
for (p = host->h_aliases; *p; p++)
free(*p);