diff options
author | Daniel Stenberg <daniel@haxx.se> | 2013-08-08 16:26:10 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2013-08-08 16:28:46 +0200 |
commit | d20def20462e7eed5cb8a078c9e09599307346d3 (patch) | |
tree | 7143516a7dc2af03403f204d46c0d1768a4af775 | |
parent | d2b36e466afd69b6e2b202aca21db3bd2e48b190 (diff) |
global dns cache: fix memory leak
The take down of the global dns cache didn't take CURLOPT_RESOLVE names
into account.
-rw-r--r-- | lib/hostip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index c137a19c3..f37b4925b 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -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; } |