From 63c1e6482a7fb195db155e1e769903e020e70874 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 1 Apr 2025 10:46:07 +0200 Subject: [PATCH] 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 --- lib/vtls/vtls_scache.c | 4 ---- 1 file changed, 4 deletions(-) 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); -- 2.47.3