From: Daniel Stenberg Date: Tue, 1 Apr 2025 08:46:07 +0000 (+0200) Subject: vtls_scache: remove "Unreachable Call" X-Git-Tag: curl-8_13_0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63c1e6482a7fb195db155e1e769903e020e70874;p=thirdparty%2Fcurl.git vtls_scache: remove "Unreachable Call" The condition required to reach this call could not happen, because cf_ssl_scache_get() already checks the same condition and returns NULL for 'scache' prior to this. Found by CodeSonar Closes #16896 --- diff --git a/lib/vtls/vtls_scache.c b/lib/vtls/vtls_scache.c index 4340592895..ea80055ad6 100644 --- a/lib/vtls/vtls_scache.c +++ b/lib/vtls/vtls_scache.c @@ -861,10 +861,6 @@ CURLcode Curl_ssl_scache_put(struct Curl_cfilter *cf, Curl_ssl_session_destroy(s); return CURLE_OK; } - if(!GOOD_SCACHE(scache)) { - Curl_ssl_session_destroy(s); - return CURLE_BAD_FUNCTION_ARGUMENT; - } Curl_ssl_scache_lock(data); result = cf_scache_add_session(cf, data, scache, ssl_peer_key, s);