summaryrefslogtreecommitdiffstats
path: root/crypto/provider_conf.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2021-11-05 13:42:40 +0000
committerMatt Caswell <matt@openssl.org>2021-11-15 14:22:41 +0000
commitd740c9d59bcff6879bc7d6ecf8b82c9300991b50 (patch)
tree3f46ee60c16545ed9d13b09d49afe92b08fe69e2 /crypto/provider_conf.c
parent4f224595162b7996bfb673457ea9d37f11478793 (diff)
Don't attempt to deactive child providers if we don't need to
If a provider doesn't have any child providers then there is no need to attempt to remove them - so we should not do so. This removes some potentialy thread races. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17018)
Diffstat (limited to 'crypto/provider_conf.c')
-rw-r--r--crypto/provider_conf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/provider_conf.c b/crypto/provider_conf.c
index 054261771a..7acfe49564 100644
--- a/crypto/provider_conf.c
+++ b/crypto/provider_conf.c
@@ -222,7 +222,7 @@ static int provider_conf_load(OSSL_LIB_CTX *libctx, const char *name,
if (!ossl_provider_activate(prov, 1, 0)) {
ok = 0;
} else if (!ossl_provider_add_to_store(prov, &actual, 0)) {
- ossl_provider_deactivate(prov);
+ ossl_provider_deactivate(prov, 1);
ok = 0;
} else {
if (pcgbl->activated_providers == NULL)