From: Pauli Date: Sun, 26 Apr 2020 22:30:49 +0000 (+1000) Subject: coverity 1462548 Resource leak X-Git-Tag: openssl-3.0.0-alpha2~126 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ada7d4c345825551678972bd4b2221db2ae52fd9;p=oweals%2Fopenssl.git coverity 1462548 Resource leak Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11651) --- diff --git a/crypto/ffc/ffc_backend.c b/crypto/ffc/ffc_backend.c index d9b3e2e8af..1cfa427df6 100644 --- a/crypto/ffc/ffc_backend.c +++ b/crypto/ffc/ffc_backend.c @@ -63,11 +63,8 @@ int ffc_params_fromdata(FFC_PARAMS *ffc, const OSSL_PARAM params[]) ffc->pcounter = i; } prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_COFACTOR); - if (prm != NULL) { - if (!OSSL_PARAM_get_BN(prm, &j)) - goto err; - j = NULL; - } + if (prm != NULL && !OSSL_PARAM_get_BN(prm, &j)) + goto err; prm = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_FFC_H); if (prm != NULL) { if (!OSSL_PARAM_get_int(prm, &i))