ksmbd: Fix resource leak in smb2_lock()
authorMarios Makassikis <mmakassikis@freebox.fr>
Tue, 29 Nov 2022 11:19:33 +0000 (12:19 +0100)
committerSteve French <stfrench@microsoft.com>
Sun, 11 Dec 2022 14:33:31 +0000 (08:33 -0600)
commit01f6c61bae3d658058ee6322af77acea26a5ee3a
tree4ac258cf63e51c386ca17a351397d892c7dfffcd
parentbc044414fa0326a4e5c3c509c00b1fcaf621b5f4
ksmbd: Fix resource leak in smb2_lock()

"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>
fs/ksmbd/smb2pdu.c