projects
/
platform
/
upstream
/
c-ares.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ares.h: there is no ares_free_soa function
[platform/upstream/c-ares.git]
/
ares_free_hostent.c
diff --git
a/ares_free_hostent.c
b/ares_free_hostent.c
index
b124560
..
7f44882
100644
(file)
--- a/
ares_free_hostent.c
+++ b/
ares_free_hostent.c
@@
-15,7
+15,6
@@
*/
#include "ares_setup.h"
-#include <stdlib.h>
#ifdef HAVE_NETDB_H
#include <netdb.h>
@@
-28,6
+27,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);