summaryrefslogtreecommitdiffstats
path: root/providers/fips
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2023-09-04 14:37:09 +1000
committerMatt Caswell <matt@openssl.org>2023-09-27 17:22:54 +0100
commitc37184f502eb7341e3095ef358a9ebd21facbc46 (patch)
treefb7de12faad4bdd05cf18416ea603f895986b60a /providers/fips
parent91bc783a93a2a695fe6a2f8da93cf5b5e086ba42 (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/21964)
Diffstat (limited to 'providers/fips')
-rw-r--r--providers/fips/fipsprov.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 0a95d2364d..607ee11763 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -697,15 +697,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;