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-next>] [day] [month] [year] [list]
Message-ID: <20230508151337.79304-1-tudor.ambarus@linaro.org>
Date:   Mon,  8 May 2023 15:13:37 +0000
From:   Tudor Ambarus <tudor.ambarus@...aro.org>
To:     tytso@....edu
Cc:     adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
        linux-kernel@...r.kernel.org, joneslee@...gle.com,
        Tudor Ambarus <tudor.ambarus@...aro.org>
Subject: [PATCH] ext4: remove superfluous check that pointer is not NULL

If @buffer is NULL, no operation is performed for kvfree(buffer),
remove superfluous check.

Signed-off-by: Tudor Ambarus <tudor.ambarus@...aro.org>
---
 fs/ext4/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index dfc2e223bd10..6778c6eb6e30 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -2676,7 +2676,7 @@ static int ext4_xattr_move_to_block(handle_t *handle, struct inode *inode,
 
 out:
 	kfree(b_entry_name);
-	if (needs_kvfree && buffer)
+	if (needs_kvfree)
 		kvfree(buffer);
 	if (is)
 		brelse(is->iloc.bh);
-- 
2.40.1.521.gf1e218fcd8-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ