Share via


freeaddrinfo (Compact 2013)

3/26/2014

This function frees address information that the getaddrinfo function dynamically allocates in its addrinfo structures.

Syntax

void freeaddrinfo(
  struct addrinfo FAR* ai
);

Parameters

  • ai
    [in] Pointer to the addrinfo structure or linked list of addrinfo structures to be freed. All dynamic storage pointed to within the addrinfo structures is also freed.

Remarks

This function frees the initial addrinfo structure pointed to in its ai parameter, including any buffers to which its members point, then continues freeing any addrinfo structures linked by its ai_next member. The freeaddrinfo function continues freeing linked structures until a NULL ai_next member is encountered.

Requirements

Header

ws2tcpip.h

Library

Ws2.lib

See Also

Reference

Socket Functions
getaddrinfo
addrinfo