From bfe2fcc840e92df5a5875e55c6aed79891d2612f Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Tue, 4 May 2021 15:38:48 +0200 Subject: [PATCH] evp_extra_test: Avoid potential double free of params Fixes #14916 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15135) --- test/evp_extra_test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index f8fdc7287df..7fd45bc316d 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -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 */ -- 2.47.2