Loading lib/easy.c +4 −1 Original line number Diff line number Diff line Loading @@ -502,9 +502,12 @@ CURLcode curl_easy_perform(CURL *curl) /* global dns cache was requested but still isn't */ struct curl_hash *ptr; if(data->dns.hostcachetype == HCACHE_PRIVATE) if(data->dns.hostcachetype == HCACHE_PRIVATE) { /* if the current cache is private, kill it first */ Curl_hash_destroy(data->dns.hostcache); data->dns.hostcachetype = HCACHE_NONE; data->dns.hostcache = NULL; } ptr = Curl_global_host_cache_init(); if(ptr) { Loading lib/hash.c +4 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ hash_element_dtor(void *user, void *element) h->dtor(e->ptr); memset(e, 0, sizeof(struct curl_hash_element)); free(e); } Loading Loading @@ -232,6 +233,7 @@ Curl_hash_clean(struct curl_hash *h) for (i = 0; i < h->slots; ++i) { Curl_llist_destroy(h->table[i], (void *) h); h->table[i] = NULL; } free(h->table); Loading Loading @@ -269,6 +271,8 @@ Curl_hash_destroy(struct curl_hash *h) return; Curl_hash_clean(h); memset(h, 0, sizeof(struct struct curl_hash)); free(h); } Loading lib/hostip.c +1 −0 Original line number Diff line number Diff line Loading @@ -695,6 +695,7 @@ static void freednsentry(void *freethis) Curl_freeaddrinfo(p->addr); memset(p, 0, sizeof(struct Curl_dns_entry)); free(p); } Loading lib/llist.c +3 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, } list->dtor(user, e->ptr); memset(e, 0, sizeof(struct curl_llist_element)); free(e); --list->size; Loading @@ -126,6 +128,7 @@ Curl_llist_destroy(struct curl_llist *list, void *user) while(list->size > 0) Curl_llist_remove(list, list->tail, user); memset(list, 0, sizeof(struct curl_llist)); free(list); } } Loading lib/multi.c +2 −0 Original line number Diff line number Diff line Loading @@ -1551,6 +1551,8 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) multi->type = 0; /* not good anymore */ Curl_hash_destroy(multi->hostcache); Curl_hash_destroy(multi->sockhash); multi->hostcache = NULL; multi->sockhash = NULL; /* go over all connections that have close actions */ for(i=0; i< multi->connc->num; i++) { Loading Loading
lib/easy.c +4 −1 Original line number Diff line number Diff line Loading @@ -502,9 +502,12 @@ CURLcode curl_easy_perform(CURL *curl) /* global dns cache was requested but still isn't */ struct curl_hash *ptr; if(data->dns.hostcachetype == HCACHE_PRIVATE) if(data->dns.hostcachetype == HCACHE_PRIVATE) { /* if the current cache is private, kill it first */ Curl_hash_destroy(data->dns.hostcache); data->dns.hostcachetype = HCACHE_NONE; data->dns.hostcache = NULL; } ptr = Curl_global_host_cache_init(); if(ptr) { Loading
lib/hash.c +4 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ hash_element_dtor(void *user, void *element) h->dtor(e->ptr); memset(e, 0, sizeof(struct curl_hash_element)); free(e); } Loading Loading @@ -232,6 +233,7 @@ Curl_hash_clean(struct curl_hash *h) for (i = 0; i < h->slots; ++i) { Curl_llist_destroy(h->table[i], (void *) h); h->table[i] = NULL; } free(h->table); Loading Loading @@ -269,6 +271,8 @@ Curl_hash_destroy(struct curl_hash *h) return; Curl_hash_clean(h); memset(h, 0, sizeof(struct struct curl_hash)); free(h); } Loading
lib/hostip.c +1 −0 Original line number Diff line number Diff line Loading @@ -695,6 +695,7 @@ static void freednsentry(void *freethis) Curl_freeaddrinfo(p->addr); memset(p, 0, sizeof(struct Curl_dns_entry)); free(p); } Loading
lib/llist.c +3 −0 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, } list->dtor(user, e->ptr); memset(e, 0, sizeof(struct curl_llist_element)); free(e); --list->size; Loading @@ -126,6 +128,7 @@ Curl_llist_destroy(struct curl_llist *list, void *user) while(list->size > 0) Curl_llist_remove(list, list->tail, user); memset(list, 0, sizeof(struct curl_llist)); free(list); } } Loading
lib/multi.c +2 −0 Original line number Diff line number Diff line Loading @@ -1551,6 +1551,8 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle) multi->type = 0; /* not good anymore */ Curl_hash_destroy(multi->hostcache); Curl_hash_destroy(multi->sockhash); multi->hostcache = NULL; multi->sockhash = NULL; /* go over all connections that have close actions */ for(i=0; i< multi->connc->num; i++) { Loading