sdk/modules/lte/altcom/api/socket/altcom_freeaddrinfo.c
/****************************************************************************
 * Name: altcom_freeaddrinfo
 *
 * Description:
 *   The altcom_freeaddrinfo() function frees the memory that was allocated
 *   for the dynamically allocated linked list res. 
 *
 * Parameters:
 *   res - The res returned by altcom_getaddrinfo()
 *
 * Returned Value:
 *   None.
 *
 ****************************************************************************/
altcom_freeaddrinfo
Description:
The altcom_freeaddrinfo() function frees the memory that was allocated
for the dynamically allocated linked list res.

The res returned by altcom_getaddrinfo()

Returned Value:
None.
altcom_freeaddrinfo Description : The altcom_freeaddrinfo () function frees the memory that was allocated for the dynamically allocated linked list res . The res returned by altcom_getaddrinfo () Returned Value : None .
void altcom_freeaddrinfo(struct altcom_addrinfo *res)
{
  FAR struct altcom_addrinfo* ai;
  FAR struct altcom_addrinfo* tmpai;
  if (res)
    {
      ai = res;
      while(ai)
        {
          tmpai = ai->ai_next;
          (void)BUFFPOOL_FREE(ai);
          ai = tmpai;
        }
      res = NULL;
    }
  else
    {
      DBGIF_LOG_INFO("altcom_freeaddrinfo(). input addrinfo is null.\n");
    }
}
void altcom_freeaddrinfo ( struct altcom_addrinfo * res ) { FAR struct altcom_addrinfo * ai ; FAR struct altcom_addrinfo * tmpai ; if ( res ) { ai = res ; while ( ai ) { tmpai = ai -> ai_next ; ( void ) BUFFPOOL_FREE ( ai ) ; ai = tmpai ; } res = NULL ; } else { DBGIF_LOG_INFO ( " \n " ) ; } }
Name: altcom_freeaddrinfo
 Description:
   The altcom_freeaddrinfo() function frees the memory that was allocated
   for the dynamically allocated linked list res.
Name : altcom_freeaddrinfo Description : The altcom_freeaddrinfo () function frees the memory that was allocated for the dynamically allocated linked list res .