mirror of
https://github.com/curl/curl.git
synced 2026-07-23 22:07:18 +03:00
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:
parent
ca18198dd4
commit
d0607b27b0
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue