-/* $Id$ */
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
*/
#include "ares_setup.h"
-#include <stdlib.h>
-#if !defined(WIN32) || defined(WATT32)
+#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif
{
char **p;
+ if (!host)
+ return;
+
free((char *)(host->h_name));
for (p = host->h_aliases; *p; p++)
free(*p);