diff options
author | Matt Caswell <matt@openssl.org> | 2021-07-27 16:31:20 +0100 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-07-28 10:34:53 +1000 |
commit | 09f38299ccc006e0ce7e94897250e995ec2fc337 (patch) | |
tree | ad56395ce1f2bb74d0badc39cc94ea6c5b8d7540 /providers/fips | |
parent | 2a7855fb2596048e5038afa5e49a02853297df6d (diff) |
Don't leak the OSSL_LIB_CTX in the event of a failure to load the FIPS module
Ensure we free the OSSL_LIB_CTX on the error path.
Fixes #16163
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16168)
Diffstat (limited to 'providers/fips')
-rw-r--r-- | providers/fips/fipsprov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index 4155b64197..b69299e046 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -712,6 +712,7 @@ int OSSL_provider_init_int(const OSSL_CORE_HANDLE *handle, return 1; err: fips_teardown(*provctx); + OSSL_LIB_CTX_free(libctx); *provctx = NULL; return 0; } |