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
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>
  • Loading branch information
z00467499 authored and Steve French committed Oct 18, 2022
1 parent 575e079 commit e909d05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/cifs/sess.c
Original file line number Diff line number Diff line change
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 e909d05

Please sign in to comment.