freeaddrinfo Subroutine

Purpose

Frees memory allocated by the getaddrinfo Subroutine.

Library

The Standard C Library (<libc.a>)

Syntax

#include <sys/socket.h>
#include <netdb.h>
void freeaddrinfo (struct addrinfo *ai)
 

Description

The freeaddrinfo subroutine frees one or more addrinfo structures returned by the getaddrinfo subroutine, along with any additional storage associated with those structures. If the ai_next field of the structure is not NULL, the entire list of structures is freed.

Parameters

Item Description
ai Points to dynamic storage allocated by the getaddrinfo subroutine