[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1


freeaddrinfo Subroutine

Purpose

To free memory allocated by getaddrinfo. This includes the addrinfo structures, the socket address structures, and canonical host name strings pointed to by the addrinfo structures.

Library

Library (libc.a)

Syntax

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

Description

This function frees any dynamic storage pointed to by elements of ai, as well as the space for ai itself. Also, it will descend the linked list, repeating this process for all nodes in the list until a NULL ai_next pointer is encountered.

Related Information

The getaddrinfo (getaddrinfo Subroutine) subroutine, gai_strerror (gai_strerror Subroutine), and getnameinfo (getnameinfo Subroutine) subroutine.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]