]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Fix xid leak in cifs_flock()
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Mon, 17 Oct 2022 14:45:23 +0000 (22:45 +0800)
committerSteve French <stfrench@microsoft.com>
Tue, 18 Oct 2022 16:33:43 +0000 (11:33 -0500)
commite79aaf6e6e9a1bb402cff15f3aa4299265b8eda1
treea475738cb5d1400170cd9b46aed37f4a346b55df
parenta16e30b6ec44e09d3fdceaa9d303e3ca0da7424f
cifs: Fix xid leak in cifs_flock()

If not flock, before return -ENOLCK, should free the xid,
otherwise, the xid will be leaked.

Fixes: dfe85a441a4a ("cifs: add support for flock")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/file.c