To free memory allocated by getipnodebyname and getipnodebyaddr.
Standard C Library (libc.a)
#include <netdb.h> void freehostent (ptr) struct hostent * ptr;
The freehostent subroutine frees any dynamic storage pointed to by elements of ptr. This includes the hostent structure and the data areas pointed to by the h_name, h_addr_list, and h_aliases members of the hostent structure.
The getipnodebyaddr subroutine and getipnodebyname subroutine.