hostip: fix unintended destruction of hash table

.. and added unit1602 for hash.c
This commit is contained in:
Anthony Avina
2015-05-02 13:49:55 -05:00
committed by Daniel Stenberg
parent 39b9bf60d1
commit 4883f7019d
11 changed files with 136 additions and 12 deletions

View File

@@ -324,8 +324,8 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */
error:
Curl_hash_clean(&multi->sockhash);
Curl_hash_clean(&multi->hostcache);
Curl_hash_destroy(&multi->sockhash);
Curl_hash_destroy(&multi->hostcache);
Curl_conncache_destroy(&multi->conn_cache);
Curl_close(multi->closure_handle);
multi->closure_handle = NULL;
@@ -1874,7 +1874,7 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
Curl_close(multi->closure_handle);
}
Curl_hash_clean(&multi->sockhash);
Curl_hash_destroy(&multi->sockhash);
Curl_conncache_destroy(&multi->conn_cache);
Curl_llist_destroy(multi->msglist, NULL);
Curl_llist_destroy(multi->pending, NULL);
@@ -1897,7 +1897,7 @@ CURLMcode curl_multi_cleanup(CURLM *multi_handle)
data = nextdata;
}
Curl_hash_clean(&multi->hostcache);
Curl_hash_destroy(&multi->hostcache);
/* Free the blacklists by setting them to NULL */
Curl_pipeline_set_site_blacklist(NULL, &multi->pipelining_site_bl);