summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2023-09-04 06:37:09 +0200
committerMatt Caswell <matt@openssl.org>2023-09-27 18:22:54 +0200
commitc37184f502eb7341e3095ef358a9ebd21facbc46 (patch)
treefb7de12faad4bdd05cf18416ea603f895986b60a /providers
parentSupport all NULL-syntax X.509v3 extensions (diff)
downloadopenssl-c37184f502eb7341e3095ef358a9ebd21facbc46.tar.xz
openssl-c37184f502eb7341e3095ef358a9ebd21facbc46.zip
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')
-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;