mirror of
https://github.com/curl/curl.git
synced 2026-06-20 20:05:38 +03:00
curl_multi_remove_handle: fix memory leak triggered with CURLOPT_RESOLVE
This commit is contained in:
parent
14b77db1b9
commit
0aabfd9963
1 changed files with 4 additions and 0 deletions
|
|
@ -649,6 +649,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
||||||
}
|
}
|
||||||
|
|
||||||
if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
|
if(easy->easy_handle->dns.hostcachetype == HCACHE_MULTI) {
|
||||||
|
if(multi->num_easy == 1) {
|
||||||
|
Curl_hostcache_destroy(easy->easy_handle);
|
||||||
|
multi->hostcache = NULL;
|
||||||
|
}
|
||||||
/* clear out the usage of the shared DNS cache */
|
/* clear out the usage of the shared DNS cache */
|
||||||
easy->easy_handle->dns.hostcache = NULL;
|
easy->easy_handle->dns.hostcache = NULL;
|
||||||
easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
|
easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue