Skip to content

Commit

Permalink
remove redundant free of NULL
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from #22210)
  • Loading branch information
paulidale committed Oct 3, 2023
1 parent 0d53f0e commit 3b804c5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions providers/fips/fipsprov.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3b804c5

Please sign in to comment.