diff options
author | Yang Tse <yangsita@gmail.com> | 2012-12-25 13:31:26 +0100 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-12-25 13:34:45 +0100 |
commit | 0aabfd99631a292a72ca601ed0e83786ce9f0ae4 (patch) | |
tree | f7bd06077c7bebeba68fe1f99f1ad2688cf67ad8 /lib | |
parent | 14b77db1b97bb382ec97535666813dea26594bd0 (diff) |
curl_multi_remove_handle: fix memory leak triggered with CURLOPT_RESOLVE
Diffstat (limited to 'lib')
-rw-r--r-- | lib/multi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index 52eeb7f9f..6834e68e1 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -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; |