summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-08-20 14:39:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-08-21 17:14:14 +0200
commit378e331e92ab0db0fb64891a46b1da18121b01a4 (patch)
tree2334c60af46cdfa41e22d465d25d455a79ce3969
parent797bacf9c5a39f68d337d13f488407eeb507a9fc (diff)
downloadcurl-378e331e92ab0db0fb64891a46b1da18121b01a4.tar.gz
asyn-ares: call ares_freeaddrinfo() to clean up addrinfo results
As this leaks memory otherwise Follow-up to ba904db0705c931 Closes #7599
-rw-r--r--lib/asyn-ares.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index 1d88b5cb1..b3c7c521a 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -728,6 +728,7 @@ static void addrinfo_cb(void *arg, int status, int timeouts,
if(ARES_SUCCESS == status) {
res->temp_ai = ares2addr(result->nodes);
res->last_status = CURL_ASYNC_SUCCESS;
+ ares_freeaddrinfo(result);
}
res->num_pending--;
}