diff options
author | Matt Caswell <matt@openssl.org> | 2021-11-09 13:48:31 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-11-15 14:22:41 +0000 |
commit | fc205cedd7b9f12a70117c5f9167ba689ec35a28 (patch) | |
tree | ce470f8b94477f37e4258e631a34c269ca1ddf99 /crypto/context.c | |
parent | 0d46c3f8e2453b407f8385545437e65c13a2fd8f (diff) |
Stop receiving child callbacks in a child libctx when appropriate
We should stop receiving child callbacks if we're about to free up
the child libctx. Otherwise we can get callbacks when the libctx is half
freed up.
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/context.c')
-rw-r--r-- | crypto/context.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/context.c b/crypto/context.c index 1e0dfa8e01..bba8e4208b 100644 --- a/crypto/context.c +++ b/crypto/context.c @@ -240,6 +240,10 @@ void OSSL_LIB_CTX_free(OSSL_LIB_CTX *ctx) if (ossl_lib_ctx_is_default(ctx)) return; +#ifndef FIPS_MODULE + if (ctx->ischild) + ossl_provider_deinit_child(ctx); +#endif context_deinit(ctx); OPENSSL_free(ctx); } |