mirror of https://github.com/openssl/openssl.git
check gctx for NULL before cleanup.
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 02f9c9342d
)
This commit is contained in:
parent
ccef4e8b8e
commit
7cabaa71be
|
@ -510,8 +510,10 @@ static void *ecx_gen_init(void *provctx, int selection,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (!ecx_gen_set_params(gctx, params)) {
|
if (!ecx_gen_set_params(gctx, params)) {
|
||||||
ecx_gen_cleanup(gctx);
|
if (gctx != NULL) {
|
||||||
gctx = NULL;
|
ecx_gen_cleanup(gctx);
|
||||||
|
gctx = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return gctx;
|
return gctx;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue