]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: Fix resource leak in smb2_lock()
authorMarios Makassikis <mmakassikis@freebox.fr>
Mon, 18 Dec 2023 15:33:27 +0000 (00:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:53 +0000 (10:41 +0100)
commit46c517bc0ac6f681745adb572bc76bfc02191fb7
treedffc4d07c2ecb60d4f6bae065c8e2bdcb1c45c5b
parent9ea6b43d8a7d7f3d90779787a3ee77e5e95a87a8
ksmbd: Fix resource leak in smb2_lock()

[ Upstream commit 01f6c61bae3d658058ee6322af77acea26a5ee3a ]

"flock" is leaked if an error happens before smb2_lock_init(), as the
lock is not added to the lock_list to be cleaned up.

Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
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