]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
remove redundant free of NULL
authorPauli <pauli@openssl.org>
Mon, 4 Sep 2023 04:37:09 +0000 (14:37 +1000)
committerMatt Caswell <matt@openssl.org>
Wed, 27 Sep 2023 16:22:54 +0000 (17:22 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21964)

providers/fips/fipsprov.c

index 0a95d2364d43e9039e1f847d3fb1a4dcf5a529f5..607ee1176316b1629e4d4b776d878dd88765f8d7 100644 (file)
@@ -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;