lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 05 Feb 2015 22:07:43 +0100
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	Anil Gurumurthy <anil.gurumurthy@...gic.com>,
	"James E. J. Bottomley" <JBottomley@...allels.com>,
	Sudarsana Kalluru <sudarsana.kalluru@...gic.com>,
	linux-scsi@...r.kernel.org
CC:	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] SCSI-bfa: Delete more unnecessary checks before the function
 call "vfree"

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Thu, 5 Feb 2015 22:02:16 +0100

The vfree() function performs also input parameter validation.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/scsi/bfa/bfad.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index e90a374..05c8ca0 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1810,11 +1810,11 @@ bfad_load_fwimg(struct pci_dev *pdev)
 static void
 bfad_free_fwimg(void)
 {
-	if (bfi_image_ct2_size && bfi_image_ct2)
+	if (bfi_image_ct2_size)
 		vfree(bfi_image_ct2);
-	if (bfi_image_ct_size && bfi_image_ct)
+	if (bfi_image_ct_size)
 		vfree(bfi_image_ct);
-	if (bfi_image_cb_size && bfi_image_cb)
+	if (bfi_image_cb_size)
 		vfree(bfi_image_cb);
 }
 
-- 
2.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ