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)

(cherry picked from commit 15410839c6)
This commit is contained in:
Pauli 2023-09-28 11:34:48 +10:00
parent e07093f222
commit dec12f2348
1 changed files with 2 additions and 1 deletions

View File

@ -529,13 +529,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 {