00001 /* Copyright 1998 by the Massachusetts Institute of Technology. 00002 * 00003 * Permission to use, copy, modify, and distribute this 00004 * software and its documentation for any purpose and without 00005 * fee is hereby granted, provided that the above copyright 00006 * notice appear in all copies and that both that copyright 00007 * notice and this permission notice appear in supporting 00008 * documentation, and that the name of M.I.T. not be used in 00009 * advertising or publicity pertaining to distribution of the 00010 * software without specific, written prior permission. 00011 * M.I.T. makes no representations about the suitability of 00012 * this software for any purpose. It is provided "as is" 00013 * without express or implied warranty. 00014 * 00015 * CHANGELOG: this file has been modified by Sergio Perez Alcañiz <serpeal@disca.upv.es> 00016 * Departamento de Informática de Sistemas y Computadores 00017 * Universidad Politécnica de Valencia 00018 * Valencia (Spain) 00019 * Date: April 2003 00020 * 00021 */ 00022 00023 #include "ares_private.h" 00024 00025 void ares_free_hostent(struct hostent *host) 00026 { 00027 char **p; 00028 00029 free(host->h_name); 00030 for (p = host->h_aliases; *p; p++) 00031 free(*p); 00032 free(host->h_aliases); 00033 free(host->h_addr_list[0]); 00034 free(host->h_addr_list); 00035 free(host); 00036 }