mirror of
https://github.com/openssl/openssl.git
synced 2025-03-13 19:47:47 +08:00
Fix memleak in dsa_gen()
Free the stack return value `dsa` on each early exit. Fixes #25905 Signed-off-by: Holger Dengler <dengler@linux.ibm.com> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Saša Nedvědický <sashan@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/25948)
This commit is contained in:
parent
79c98fc6cc
commit
f4550fb5b5
@ -631,7 +631,7 @@ static void *dsa_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg)
|
||||
&& (gctx->gen_type <= DSA_PARAMGEN_TYPE_FIPS_DEFAULT))) {
|
||||
ERR_raise_data(ERR_LIB_PROV, ERR_R_INTERNAL_ERROR,
|
||||
"gen_type set to unsupported value %d", gctx->gen_type);
|
||||
return NULL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
gctx->cb = osslcb;
|
||||
|
Loading…
x
Reference in New Issue
Block a user