1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

curl_multi_remove_handle: fix memory leak triggered with CURLOPT_RESOLVE

This commit is contained in:
Yang Tse 2012-12-25 13:31:26 +01:00
parent 14b77db1b9
commit 0aabfd9963

View File

@ -649,6 +649,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
}
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 */
easy->easy_handle->dns.hostcache = NULL;
easy->easy_handle->dns.hostcachetype = HCACHE_NONE;