diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-03-14 16:55:01 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-03-15 00:10:21 +0100 |
commit | e5e881553208fd865c56286a3e251d19f6f77c7a (patch) | |
tree | cb05e77ef5c902f7e62fa689e671833e2f5fb134 /lib/multi.c | |
parent | 5ec15ea48fe87453b53a8df9b9f9e2277a874b73 (diff) | |
download | curl-e5e881553208fd865c56286a3e251d19f6f77c7a.tar.gz |
lib: skip Curl_llist_destroy calls
Linked lists themselves do not carry any allocations, so for the lists
that do not have have a set destructor we can just skip the
Curl_llist_destroy() call and save CPU time.
Closes #10764
Diffstat (limited to 'lib/multi.c')
-rw-r--r-- | lib/multi.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/multi.c b/lib/multi.c index 6e272cb66..b466a49b7 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -445,9 +445,6 @@ struct Curl_multi *Curl_multi_handle(int hashsize, /* socket hash */ sockhash_destroy(&multi->sockhash); Curl_hash_destroy(&multi->hostcache); Curl_conncache_destroy(&multi->conn_cache); - Curl_llist_destroy(&multi->msglist, NULL); - Curl_llist_destroy(&multi->pending, NULL); - free(multi); return NULL; } @@ -841,10 +838,6 @@ CURLMcode curl_multi_remove_handle(struct Curl_multi *multi, Curl_wildcard_dtor(&data->wildcard); - /* destroy the timeout list that is held in the easy handle, do this *after* - multi_done() as that may actually call Curl_expire that uses this */ - Curl_llist_destroy(&data->state.timeoutlist, NULL); - /* change state without using multistate(), only to make singlesocket() do what we want */ data->mstate = MSTATE_COMPLETED; @@ -2795,9 +2788,6 @@ CURLMcode curl_multi_cleanup(struct Curl_multi *multi) sockhash_destroy(&multi->sockhash); Curl_conncache_destroy(&multi->conn_cache); - Curl_llist_destroy(&multi->msglist, NULL); - Curl_llist_destroy(&multi->pending, NULL); - Curl_hash_destroy(&multi->hostcache); Curl_psl_destroy(&multi->psl); |