From: Tomas Mraz Date: Tue, 4 May 2021 13:38:48 +0000 (+0200) Subject: evp_extra_test: Avoid potential double free of params X-Git-Tag: openssl-3.0.0-alpha17~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfe2fcc840e92df5a5875e55c6aed79891d2612f;p=thirdparty%2Fopenssl.git evp_extra_test: Avoid potential double free of params Fixes #14916 Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15135) --- 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 */