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
configure: avoid direct usage of AS_TR_* macros
[platform/upstream/c-ares.git]
/
ares_free_hostent.c
diff --git
a/ares_free_hostent.c
b/ares_free_hostent.c
index
f07fd7c
..
349d379
100644
(file)
--- a/
ares_free_hostent.c
+++ b/
ares_free_hostent.c
@@
-1,4
+1,3
@@
-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
@@
-29,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);