evp_extra_test: Avoid potential double free of params

Fixes #14916

Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15135)
This commit is contained in:
Tomas Mraz 2021-05-04 15:38:48 +02:00
parent 6ef2f71ac7
commit bfe2fcc840

View File

@ -688,6 +688,7 @@ static int test_EC_priv_pub(void)
if (!test_fromdata("EC", params))
goto err;
OSSL_PARAM_free(params);
params = NULL;
OSSL_PARAM_BLD_free(bld);
/* Test priv and !pub */
@ -704,6 +705,7 @@ static int test_EC_priv_pub(void)
if (!test_fromdata("EC", params))
goto err;
OSSL_PARAM_free(params);
params = NULL;
OSSL_PARAM_BLD_free(bld);
/* Test !priv and pub */
@ -721,6 +723,7 @@ static int test_EC_priv_pub(void)
if (!test_fromdata("EC", params))
goto err;
OSSL_PARAM_free(params);
params = NULL;
OSSL_PARAM_BLD_free(bld);
/* Test priv and pub */