asyn-ares: call ares_freeaddrinfo() to clean up addrinfo results

As this leaks memory otherwise

Follow-up to ba904db070

Closes #7599
This commit is contained in:
Daniel Stenberg 2021-08-20 14:39:14 +02:00
parent 797bacf9c5
commit 378e331e92
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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--;
}