diff options
author | Pauli <paul.dale@oracle.com> | 2020-04-27 08:30:49 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-04-30 20:21:32 +1000 |
commit | ada7d4c345825551678972bd4b2221db2ae52fd9 (patch) | |
tree | ac2279f85e34f5294ce998a7517dbd139f535fbf /crypto | |
parent | 089c292825a3b64ed375223751bd84a6da8312c1 (diff) |
coverity 1462548 Resource leak
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ffc/ffc_backend.c | 7 |
1 files changed, 2 insertions, 5 deletions
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)) |