Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Yang <kaishen.yy@antfin.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27795)
(cherry picked from commit
443298e0f0e2c8225f8c6d6fdc01c6c4d434028b)
gctx->libctx = libctx;
gctx->type = type;
gctx->selection = selection;
+ } else {
+ return NULL;
}
if (!ecx_gen_set_params(gctx, params)) {
- if (gctx != NULL) {
- ecx_gen_cleanup(gctx);
- gctx = NULL;
- }
+ ecx_gen_cleanup(gctx);
+ gctx = NULL;
}
return gctx;
}