diff options
author | Zhang Xiaoxu <zhangxiaoxu5@huawei.com> | 2022-10-17 22:45:24 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-29 10:12:56 +0200 |
commit | 847301f0ee1c29f34cc48547ce1071990f24969c (patch) | |
tree | ef89763b119404f1544630e29c8b2ea7a5c9a0bd /fs | |
parent | 8905d13b9ede4caa88c577faed832d6c7383f4fb (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/sess.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 5500ea783784..0fbd0f78f361 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c @@ -320,6 +320,7 @@ out: if (rc && chan->server) cifs_put_tcp_session(chan->server, 0); + free_xid(xid); return rc; } |