1 /*****************************************************************************
2 * freeaddrinfo.c: freeaddrinfo() replacement functions
3 *****************************************************************************
4 * Copyright (C) 2005 the VideoLAN team
5 * Copyright (C) 2002-2007 Rémi Denis-Courmont
6 * Copyright (C) 2011-2014 KO Myung-Hun
8 * Authors: KO Myung-Hun <komh@chollian.net>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published by
13 * the Free Software Foundation; either version 2.1 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
33 * This function must be used to free the memory allocated by getaddrinfo().
35 void freeaddrinfo (struct addrinfo
*res
)
39 struct addrinfo
*next
= res
->ai_next
;
41 free (res
->ai_canonname
);