aboutsummaryrefslogtreecommitdiff
path: root/lib/hostares.c
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2006-07-24 15:58:33 +0000
committerGisle Vanem <gvanem@broadpark.no>2006-07-24 15:58:33 +0000
commitf2aa3b21e0e1c665414e707ba9c3414d264ad4bf (patch)
tree0df816fecd1e52606de41789106866a5ebbecd24 /lib/hostares.c
parent385db0e97d901f7308ebe92318d6e5a05891cd54 (diff)
Use the proper Curl_freeaddrinfo() for CURLRES_ARES.
Diffstat (limited to 'lib/hostares.c')
-rw-r--r--lib/hostares.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/hostares.c b/lib/hostares.c
index af1513ca2..1842d5f4f 100644
--- a/lib/hostares.c
+++ b/lib/hostares.c
@@ -298,6 +298,22 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
* The rest of this file is copied from hostip4.c. (needed for the
* combination USE_ARES and ENABLE_IPV6).
*/
+/*
+ * This is a function for freeing name information in a protocol independent
+ * way.
+ */
+void Curl_freeaddrinfo(Curl_addrinfo *ai)
+{
+ Curl_addrinfo *next;
+
+ /* walk over the list and free all entries */
+ while(ai) {
+ next = ai->ai_next;
+ free(ai);
+ ai = next;
+ }
+}
+
struct namebuf {
struct hostent hostentry;
char *h_addr_list[2];