]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: Remove a redundant zeroing of memory
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 18 Dec 2023 15:32:48 +0000 (00:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:50 +0000 (10:41 +0100)
commita5213868c62b43a91d6aa0cedbec83b493c706ca
treeec2d422df6d0dd32465eb1e94927c5f98a3c0679
parent7ee6f9ba978391bda6d2602d1b96f8e54ff49025
ksmbd: Remove a redundant zeroing of memory

[ Upstream commit 56b401fb0c506120f25c1b4feeb96d9117efe171 ]

fill_transform_hdr() has only one caller that already clears tr_buf (it is
kzalloc'ed).

So there is no need to clear it another time here.

Remove the superfluous memset() and add a comment to remind that the caller
must clear the buffer.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Hyunchul Lee <hyc.lee@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb2pdu.c