]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: Fix resource leak in smb2_lock()
authorMarios Makassikis <mmakassikis@freebox.fr>
Sun, 31 Dec 2023 07:12:23 +0000 (16:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:18:27 +0000 (15:18 +0100)
commit87ffbb9e24badbb56873c3f84f1fbd062af316bb
tree7b303a13fc69058f5c66b0689d7982ed78f26851
parentd847b75883419177e165353ffc4b8e6a436b3612
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: Sasha Levin <sashal@kernel.org>
fs/smb/server/smb2pdu.c