ares: memory leak fix

The double name resolve trick used with c-ares could leave allocated
memory in 'temp_ai' if the operation was aborted in the middle.
This commit is contained in:
Daniel Stenberg
2011-01-27 14:37:25 +01:00
parent 2d356ba168
commit ef19e30985
2 changed files with 14 additions and 7 deletions

View File

@@ -5241,6 +5241,8 @@ CURLcode Curl_done(struct connectdata **connp,
data->req.location = NULL;
}
Curl_async_cancel(conn);
if(conn->dns_entry) {
Curl_resolv_unlock(data, conn->dns_entry); /* done with this */
conn->dns_entry = NULL;