cifs: Fix xid leak in cifs_ses_add_channel()
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Mon, 17 Oct 2022 14:45:24 +0000 (22:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:12:56 +0000 (10:12 +0200)
commit847301f0ee1c29f34cc48547ce1071990f24969c
treeef89763b119404f1544630e29c8b2ea7a5c9a0bd
parent8905d13b9ede4caa88c577faed832d6c7383f4fb
cifs: Fix xid leak in cifs_ses_add_channel()

[ Upstream commit e909d054bdea75ef1ec48c18c5936affdaecbb2c ]

Before return, should free the xid, otherwise, the
xid will be leaked.

Fixes: d70e9fa55884 ("cifs: try opening channels after mounting")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/sess.c