Coverity 1503321 & 1503327: dereference after null check

The earlier fix being inadequate

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/18822)
This commit is contained in:
Pauli 2022-07-19 11:01:57 +10:00
parent 1efd8533e1
commit f913c3cd7e

View File

@ -1252,7 +1252,7 @@ int ossl_provider_deactivate(OSSL_PROVIDER *prov, int removechildren)
void *ossl_provider_ctx(const OSSL_PROVIDER *prov)
{
return prov->provctx != NULL ? prov->provctx : NULL;
return prov != NULL ? prov->provctx : NULL;
}
/*