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]
Message-ID: <55901F40.90500@users.sourceforge.net>
Date:	Sun, 28 Jun 2015 18:22:24 +0200
From:	SF Markus Elfring <elfring@...rs.sourceforge.net>
To:	Alex Williamson <alex.williamson@...hat.com>, kvm@...r.kernel.org
CC:	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Alexey Kardashevskiy <aik@...abs.ru>,
	Julia Lawall <julia.lawall@...6.fr>,
	Michael Ellerman <mpe@...erman.id.au>
Subject: [PATCH 1/2] vfio: powerpc/spapr: Delete an unnecessary check before
 the function call "kfree"

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 28 Jun 2015 17:43:48 +0200

The kfree() function tests whether its argument is NULL and then
returns immediately. 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/vfio/vfio_iommu_spapr_tce.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c
index 0582b72..50ddfac 100644
--- a/drivers/vfio/vfio_iommu_spapr_tce.c
+++ b/drivers/vfio/vfio_iommu_spapr_tce.c
@@ -1215,7 +1215,7 @@ static int tce_iommu_attach_group(void *iommu_data,
 	}
 
 unlock_exit:
-	if (ret && tcegrp)
+	if (ret)
 		kfree(tcegrp);
 
 	mutex_unlock(&container->lock);
-- 
2.4.4

--
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