]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
http_ntlm: remove unreachable code
authorDaniel Stenberg <daniel@haxx.se>
Wed, 11 Jun 2025 09:14:15 +0000 (11:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 11 Jun 2025 21:06:06 +0000 (23:06 +0200)
Since the code now checks for NULL and returns before this point, 'ntlm'
cannot be NULL at this point in the code. Pointed out by Coverity.

Follow-up to 55865207457ba860956aea7a31a

Closes #17587

lib/http_ntlm.c

index 8c2ff40480103db977dd820f8b1a61c0bf67aa35..0dff8f3a0076e059d1b7e8ae5ca5d42684f2f45f 100644 (file)
@@ -202,9 +202,8 @@ CURLcode Curl_output_ntlm(struct Curl_easy *data, bool proxy)
   case NTLMSTATE_TYPE1:
   default: /* for the weird cases we (re)start here */
     /* Create a type-1 message */
-    result = !ntlm ? CURLE_OUT_OF_MEMORY :
-      Curl_auth_create_ntlm_type1_message(data, userp, passwdp, service,
-                                          hostname, ntlm, &ntlmmsg);
+    result = Curl_auth_create_ntlm_type1_message(data, userp, passwdp, service,
+                                                 hostname, ntlm, &ntlmmsg);
     if(!result) {
       DEBUGASSERT(Curl_bufref_len(&ntlmmsg) != 0);
       result = curlx_base64_encode((const char *) Curl_bufref_ptr(&ntlmmsg),