From b950c8c03f638d986a5650a7ea7fda61bde3baf7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 11 Jun 2025 11:14:15 +0200 Subject: [PATCH] http_ntlm: remove unreachable code 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 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/http_ntlm.c b/lib/http_ntlm.c index 8c2ff40480..0dff8f3a00 100644 --- a/lib/http_ntlm.c +++ b/lib/http_ntlm.c @@ -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), -- 2.47.3