summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>2022-10-17 22:45:24 +0800
committerSteve French <stfrench@microsoft.com>2022-10-18 11:33:43 -0500
commite909d054bdea75ef1ec48c18c5936affdaecbb2c (patch)
tree16d2f88271d7241fb12f732d62574d3aa682cdbe
parent575e079c782b9862ec2626403922d041a42e6ed6 (diff)
downloadlinux-e909d054bdea75ef1ec48c18c5936affdaecbb2c.tar.bz2
cifs: Fix xid leak in cifs_ses_add_channel()
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>
-rw-r--r--fs/cifs/sess.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index 0435d1dfa9e1..92e4278ec35d 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -496,6 +496,7 @@ out:
cifs_put_tcp_session(chan->server, 0);
}
+ free_xid(xid);
return rc;
}