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] [day] [month] [year] [list]
Date:   Mon, 13 Feb 2017 15:31:20 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Abutalib Aghayev <agayev@...cmu.edu>
Cc:     kbuild-all@...org, linux-ext4@...r.kernel.org,
        Theodore Ts'o <tytso@....edu>
Subject: [PATCH] fix ifnullfree.cocci warnings

fs/jbd2/jmap.c:19:2-20: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.

 NULL check before some freeing functions is not needed.

 Based on checkpatch warning
 "kfree(NULL) is safe this check is probably not required"
 and kfreeaddr.cocci by Julia Lawall.

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

CC: Abutalib Aghayev <agayev@...cmu.edu>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

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

--- a/fs/jbd2/jmap.c
+++ b/fs/jbd2/jmap.c
@@ -15,8 +15,7 @@ int jbd2_journal_init_jmap_cache(void)
 
 void jbd2_journal_destroy_jmap_cache(void)
 {
-	if (jbd2_jmap_cache)
-		kmem_cache_destroy(jbd2_jmap_cache);
+	kmem_cache_destroy(jbd2_jmap_cache);
 	jbd2_jmap_cache = NULL;
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ