fix: add check for NULL zalloc in tls-provider.c (reverse if statement)
CLA: trivial Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/26814)
This commit is contained in:
parent
cab4e7cbd1
commit
c5eb70de75
1 changed files with 3 additions and 2 deletions
|
@ -930,9 +930,10 @@ static void *xor_gen_init(void *provctx, int selection,
|
|||
| OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)) == 0)
|
||||
return NULL;
|
||||
|
||||
if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) != NULL)
|
||||
gctx->selection = selection;
|
||||
if ((gctx = OPENSSL_zalloc(sizeof(*gctx))) == NULL)
|
||||
return NULL;
|
||||
|
||||
gctx->selection = selection;
|
||||
gctx->libctx = PROV_XOR_LIBCTX_OF(provctx);
|
||||
|
||||
if (!xor_gen_set_params(gctx, params)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue