coverity 1462548 Resource leak
authorPauli <paul.dale@oracle.com>
Sun, 26 Apr 2020 22:30:49 +0000 (08:30 +1000)
committerPauli <paul.dale@oracle.com>
Thu, 30 Apr 2020 10:21:32 +0000 (20:21 +1000)
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11651)

crypto/ffc/ffc_backend.c

index d9b3e2e8af7973a8da338cba8f65abf375073ab0..1cfa427df6e021ef76a2feff0e105c3dea564e72 100644 (file)
@@ -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))