]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: remove call to Curl_llist_destroy in Curl_close
authorDaniel Stenberg <daniel@haxx.se>
Mon, 27 Mar 2023 13:54:58 +0000 (15:54 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 27 Mar 2023 21:36:16 +0000 (23:36 +0200)
A list that is created with a NULL "destructor" does not need to be
destroyed. Not calling it is faster than calling it.

Closes #10846

lib/url.c

index c1fdd1d678196911ea4f584bf4a5885ea5f17cff..c4844c95de8ee99b87fa65cb9ad059dadb2ff15b 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -371,11 +371,6 @@ CURLcode Curl_close(struct Curl_easy **datap)
     data->multi_easy = NULL;
   }
 
-  /* Destroy the timeout list that is held in the easy handle. It is
-     /normally/ done by curl_multi_remove_handle() but this is "just in
-     case" */
-  Curl_llist_destroy(&data->state.timeoutlist, NULL);
-
   data->magic = 0; /* force a clear AFTER the possibly enforced removal from
                       the multi handle, since that function uses the magic
                       field! */