]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
vtls_scache: remove "Unreachable Call"
authorDaniel Stenberg <daniel@haxx.se>
Tue, 1 Apr 2025 08:46:07 +0000 (10:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 1 Apr 2025 13:27:56 +0000 (15:27 +0200)
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

index 43405928951aa8457a2bd4efe2f2820028e4f050..ea80055ad6f92c047150af5a5f8f54a74b523bdc 100644 (file)
@@ -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);