]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: two multi pointer checks should probably rather be asserts
authorDaniel Stenberg <daniel@haxx.se>
Fri, 3 Nov 2023 23:01:28 +0000 (00:01 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 4 Nov 2023 11:23:46 +0000 (12:23 +0100)
... so add the asserts now and consider removing the dynamic checks in a
future.

Ref: #12261
Closes #12264

lib/vtls/openssl.c

index c2565ef1f1b55ca9edda0b7a45aa7e06387710f4..c6407de7fd050fe123e19ebb14e60690b5d6f578 100644 (file)
@@ -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;