The function call freehostent() frees the memory of one or more hostent() structures returned by the getipnodebyaddr() or getipnodebynameinfo() functions.
void freehostent(struct hostent *ptr);
*ptr: A pointer to the structure hostent.