Coverity 1545176: dereference before NULL check

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/22211)
This commit is contained in:
Pauli 2023-09-28 11:34:48 +10:00
parent 8ed76c62b5
commit 15410839c6
1 changed files with 2 additions and 1 deletions

View File

@ -536,13 +536,14 @@ static EVP_RAND_CTX *rand_new_seed(OSSL_LIB_CTX *libctx)
EVP_RAND *rand;
RAND_GLOBAL *dgbl = rand_get_global(libctx);
EVP_RAND_CTX *ctx = NULL;
const char *propq = dgbl->seed_propq;
const char *propq;
char *name, *props = NULL;
size_t props_len;
OSSL_PROPERTY_LIST *pl1, *pl2, *pl3 = NULL;
if (dgbl == NULL)
return NULL;
propq = dgbl->seed_propq;
if (dgbl->seed_name != NULL) {
name = dgbl->seed_name;
} else {