(free_hostent_ptr): Use free_addr_list to free h_addr_list element. (dup_addr_list): New static function. (dup_hostent_ptr): Use dup_addr_list instead of dup_char_list in order to handle embedded null characters.