cifs: Fix xid leak in cifs_ses_add_channel()

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

Fixes: d70e9fa558 ("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>
This commit is contained in:
Zhang Xiaoxu 2022-10-17 22:45:24 +08:00 committed by Steve French
parent 575e079c78
commit e909d054bd

View File

@ -496,6 +496,7 @@ out:
cifs_put_tcp_session(chan->server, 0);
}
free_xid(xid);
return rc;
}