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>] [day] [month] [year] [list]
Message-ID: <1573888053-2358-1-git-send-email-chenwandun@huawei.com>
Date:   Sat, 16 Nov 2019 15:07:33 +0800
From:   Chen Wandun <chenwandun@...wei.com>
To:     <trond.myklebust@...merspace.com>, <anna.schumaker@...app.com>,
        <linux-nfs@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC:     <chenwandun@...wei.com>
Subject: [PATCH] NFS: remove redundant null pointer check before kfree

kfree has taken null pointer check into account. so it is safe
to remove the unnecessary check.

Signed-off-by: Chen Wandun <chenwandun@...wei.com>
---
 fs/nfs/sysfs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index 4f3390b..c489496 100644
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -121,8 +121,7 @@ static void nfs_netns_client_release(struct kobject *kobj)
 			struct nfs_netns_client,
 			kobject);
 
-	if (c->identifier)
-		kfree(c->identifier);
+	kfree(c->identifier);
 	kfree(c);
 }
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ