vtls_scache: avoid a "Redundant Condition"

Pointed out by CodeSonar. "ssl_config" can in fact not be NULL here.
Made it an assert instead.

Closes #15948
This commit is contained in:
Daniel Stenberg 2025-01-09 08:20:22 +01:00
parent ca18198dd4
commit d0607b27b0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -795,8 +795,9 @@ CURLcode Curl_ssl_scache_put(struct Curl_cfilter *cf,
struct Curl_ssl_scache *scache = data->state.ssl_scache;
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
CURLcode result;
DEBUGASSERT(ssl_config);
if(!ssl_config || !scache || !ssl_config->primary.cache_session) {
if(!scache || !ssl_config->primary.cache_session) {
Curl_ssl_session_destroy(s);
return CURLE_OK;
}