mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:51:42 +03:00
global dns cache: fix memory leak
The take down of the global dns cache didn't take CURLOPT_RESOLVE names into account.
This commit is contained in:
parent
d2b36e466a
commit
d20def2046
1 changed files with 4 additions and 0 deletions
|
|
@ -140,6 +140,10 @@ struct curl_hash *Curl_global_host_cache_init(void)
|
|||
void Curl_global_host_cache_dtor(void)
|
||||
{
|
||||
if(host_cache_initialized) {
|
||||
/* first make sure that any custom "CURLOPT_RESOLVE" names are
|
||||
cleared off */
|
||||
Curl_hostcache_clean(NULL, &hostname_cache);
|
||||
/* then free the remaining hash completely */
|
||||
Curl_hash_clean(&hostname_cache);
|
||||
host_cache_initialized = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue