Fix a leak in evp_test
If evp_test fails to load the legacy provider then it leaks a reference to the default provider. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9270)
This commit is contained in:
parent
9a131ad747
commit
19ea6b2b37
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue