Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Friday, August 13, 2021
 
 

freeaddrinfo (3C)

Name

freeaddrinfo - release address information memory

Synopsis

#include <sys/socket.h>
#include <netdb.h>

void freeaddrinfo(struct addrinfo *ai);

Description

The freeaddrinfo() function frees one or more addrinfo structures returned by getaddrinfo(3C), along with any additional storage associated with those structures. If the ai_next member of the structure is not null, the entire list of structures is freed. The freeaddrinfo () function supports the freeing of arbitrary sublists of an addrinfo list originally returned by getaddrinfo().

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe
Standard

See Also

getaddrinfo(3C), netdb.h(3HEAD), attributes(7), standards(7)

Gilligan, R. RFC 3493, Basic Socket Interface Extensions for IPv6. Network Working Group. February 2003. https://tools.ietf.org/html/rfc3493

History

The freeaddrinfo() function was added to Oracle Solaris in the Solaris 8 release.