]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
test1960: don't close the socket too early 16123/head
authorDan Fandrich <dan@coneharvesters.com>
Fri, 24 Jan 2025 01:48:21 +0000 (17:48 -0800)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 28 Jan 2025 17:43:31 +0000 (09:43 -0800)
The socket was closed while the handle was still in use, so
curl_easy_cleanup ended up setting nonblocking mode on a closed handle.

Closes #16123

tests/libtest/lib1960.c

index 58cc8da10978463b9f59026ff85cc4fc40d540bf..15096f226595c2e901675b0ca086a9785cf4c401 100644 (file)
@@ -121,9 +121,9 @@ CURLcode test(char *URL)
   res = curl_easy_perform(curl);
 
 test_cleanup:
+  curl_easy_cleanup(curl);
   if(client_fd != CURL_SOCKET_BAD)
     sclose(client_fd);
-  curl_easy_cleanup(curl);
   curl_global_cleanup();
 
   return res;