diff options
author | Pauli <pauli@openssl.org> | 2023-09-04 14:37:09 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-10-03 18:54:03 +1100 |
commit | 3b804c513d8d586ba8df064ee7893c10f0a0759c (patch) | |
tree | 88a744724a00a816265bbc8285c5d82eb542c9cd | |
parent | 0d53f0e5a1d34b22e2fdb2cbb58fc05d55f3605f (diff) |
remove redundant free of NULL
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22210)
-rw-r--r-- | providers/fips/fipsprov.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index 518226dfc6..0cd5e1bba2 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -691,15 +691,8 @@ int OSSL_provider_init_int(const OSSL_CORE_HANDLE *handle, /* Create a context. */ if ((*provctx = ossl_prov_ctx_new()) == NULL - || (libctx = OSSL_LIB_CTX_new()) == NULL) { - /* - * We free libctx separately here and only here because it hasn't - * been attached to *provctx. All other error paths below rely - * solely on fips_teardown. - */ - OSSL_LIB_CTX_free(libctx); + || (libctx = OSSL_LIB_CTX_new()) == NULL) goto err; - } if ((fgbl = ossl_lib_ctx_get_data(libctx, OSSL_LIB_CTX_FIPS_PROV_INDEX)) == NULL) goto err; |