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]
Date:   Mon, 27 Jul 2020 12:42:15 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...ia.fr>
To:     Pascal Bouchareine <kalou@....net>
cc:     kbuild-all@...ts.01.org, Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] proc,fcntl: fix ifnullfree.cocci warnings

From: kernel test robot <lkp@...el.com>

NULL check before kfree is not needed.

Generated by: scripts/coccinelle/free/ifnullfree.cocci

CC: Pascal Bouchareine <kalou@....net>
Signed-off-by: kernel test robot <lkp@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...ia.fr>
---

tree:   https://github.com/0day-ci/linux/commits/UPDATE-20200726-101057/Pascal-Bouchareine/proc-fcntl-introduce-F_SET_DESCRIPTION/20200726-053047
head:   56b3babdfa5600eeed065807fd6e80d150b1766b
commit: 56b3babdfa5600eeed065807fd6e80d150b1766b [1/1] proc,fcntl: introduce F_SET_DESCRIPTION
:::::: branch date: 27 hours ago
:::::: commit date: 27 hours ago

Please take the patch only if it's a positive warning. Thanks!

 file_table.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -272,8 +272,7 @@ static void __fput(struct file *file)
 	eventpoll_release(file);
 	locks_remove_file(file);

-	if (file->f_description)
-		kfree(file->f_description);
+	kfree(file->f_description);

 	ima_file_free(file);
 	if (unlikely(file->f_flags & FASYNC)) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ