aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2024-04-11 11:34:57 +0200
committerTomas Mraz <tomas@openssl.org>2024-06-07 08:42:46 +0200
commit140540189c67ba94188165b1144fdfb5b248bc02 (patch)
tree487f3223717873d14e3b1e63686322603686d4b0 /test
parent417dad1e370b19f94682d1006cb54d10ac90b8ec (diff)
downloadopenssl-140540189c67ba94188165b1144fdfb5b248bc02.zip
openssl-140540189c67ba94188165b1144fdfb5b248bc02.tar.gz
openssl-140540189c67ba94188165b1144fdfb5b248bc02.tar.bz2
test/prov_config_test.c: Cleanup and fix potential leaks
Fixes #24106 Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/24107)
Diffstat (limited to 'test')
-rw-r--r--test/prov_config_test.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/prov_config_test.c b/test/prov_config_test.c
index 4f0cbc2..4dd9c67 100644
--- a/test/prov_config_test.c
+++ b/test/prov_config_test.c
@@ -26,15 +26,13 @@ static int test_double_config(void)
int testresult = 0;
EVP_MD *sha256 = NULL;
- if (!TEST_ptr(configfile))
- return 0;
if (!TEST_ptr(ctx))
return 0;
if (!TEST_true(OSSL_LIB_CTX_load_config(ctx, configfile)))
- return 0;
+ goto err;
if (!TEST_true(OSSL_LIB_CTX_load_config(ctx, configfile)))
- return 0;
+ goto err;
/* Check we can actually fetch something */
sha256 = EVP_MD_fetch(ctx, "SHA2-256", NULL);
@@ -54,9 +52,6 @@ static int test_recursive_config(void)
int testresult = 0;
unsigned long err;
- if (!TEST_ptr(recurseconfigfile))
- goto err;
-
if (!TEST_ptr(ctx))
goto err;