aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 040a64cd1..a21cda0ae 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -450,8 +450,11 @@ CURLcode Curl_close(struct SessionHandle *data)
return CURLE_OK;
}
- if(data->dns.hostcachetype == HCACHE_PRIVATE)
+ if(data->dns.hostcachetype == HCACHE_PRIVATE) {
Curl_hash_destroy(data->dns.hostcache);
+ data->dns.hostcachetype = HCACHE_NONE;
+ data->dns.hostcache = NULL;
+ }
if(data->state.rangestringalloc)
free(data->state.range);