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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1536416318-34106-1-git-send-email-zhongjiang@huawei.com>
Date:   Sat, 8 Sep 2018 22:18:38 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <boris.ostrovsky@...cle.com>, <jgross@...e.com>
CC:     <xen-devel@...ts.xenproject.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] xen: remove unnecessary condition check before kfree

kfree has taken null pointer into account. So just remove the
condition check before kfree.

Signed-off-by: zhong jiang <zhongjiang@...wei.com>
---
 drivers/xen/xen-acpi-processor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/xen-acpi-processor.c b/drivers/xen/xen-acpi-processor.c
index fbb9137..7e1d49e 100644
--- a/drivers/xen/xen-acpi-processor.c
+++ b/drivers/xen/xen-acpi-processor.c
@@ -268,7 +268,7 @@ static int push_pxx_to_hypervisor(struct acpi_processor *_pr)
 		pr_warn("(_PXX): Hypervisor error (%d) for ACPI CPU%u\n",
 			ret, _pr->acpi_id);
 err_free:
-	if (!IS_ERR_OR_NULL(dst_states))
+	if (!IS_ERR(dst_states))
 		kfree(dst_states);
 
 	return ret;
-- 
1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ