Skip to content

Commit

Permalink
cifs: Fix xid leak in cifs_ses_add_channel()
Browse files Browse the repository at this point in the history
[ Upstream commit e909d05 ]

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

Fixes: d70e9fa ("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>
  • Loading branch information
z00467499 authored and gregkh committed Oct 29, 2022
1 parent f8c9b4a commit db2a8b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/cifs/sess.c
Expand Up @@ -496,6 +496,7 @@ cifs_ses_add_channel(struct cifs_sb_info *cifs_sb, struct cifs_ses *ses,
cifs_put_tcp_session(chan->server, 0);
}

free_xid(xid);
return rc;
}

Expand Down

0 comments on commit db2a8b6

Please sign in to comment.