summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/evp_test.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index 6fc9f03797..b70b4ea600 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -3096,8 +3096,10 @@ int setup_tests(void)
return 0;
#ifndef NO_LEGACY_MODULE
legacyprov = OSSL_PROVIDER_load(NULL, "legacy");
- if (!TEST_ptr(legacyprov))
+ if (!TEST_ptr(legacyprov)) {
+ OSSL_PROVIDER_unload(defltprov);
return 0;
+ }
#endif /* NO_LEGACY_MODULE */
ADD_ALL_TESTS(run_file_tests, n);