]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
socks_sspi: restore non-blocking socket on error paths
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Wed, 17 Sep 2025 22:43:11 +0000 (03:43 +0500)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 18 Sep 2025 06:13:52 +0000 (08:13 +0200)
Closes #18592

lib/socks_sspi.c

index 49210585b0f018650cfffbf62ccc238b202d4744..c106fec0c8fb1df92857f49e00a6c021b5dcf46e 100644 (file)
@@ -559,6 +559,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
   */
   return CURLE_OK;
 error:
+  (void)curlx_nonblock(sock, TRUE);
   free(service_name);
   Curl_pSecFn->FreeCredentialsHandle(&cred_handle);
   Curl_pSecFn->DeleteSecurityContext(&sspi_context);