From: Daniel Stenberg Date: Fri, 3 Nov 2023 23:01:28 +0000 (+0100) Subject: openssl: two multi pointer checks should probably rather be asserts X-Git-Tag: curl-8_5_0~144 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b3c4bbfcaabfc83bed2fde006e4d2edd1fbc1b34;p=thirdparty%2Fcurl.git openssl: two multi pointer checks should probably rather be asserts ... so add the asserts now and consider removing the dynamic checks in a future. Ref: #12261 Closes #12264 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index c2565ef1f1..c6407de7fd 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -3374,6 +3374,7 @@ static X509_STORE *get_cached_x509_store(struct Curl_cfilter *cf, struct Curl_multi *multi = data->multi_easy ? data->multi_easy : data->multi; X509_STORE *store = NULL; + DEBUGASSERT(multi); if(multi && multi->ssl_backend_data && multi->ssl_backend_data->store && @@ -3393,6 +3394,7 @@ static void set_cached_x509_store(struct Curl_cfilter *cf, struct Curl_multi *multi = data->multi_easy ? data->multi_easy : data->multi; struct multi_ssl_backend_data *mbackend; + DEBUGASSERT(multi); if(!multi) return;