Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fixing to avoid invalid kfree() in cifs_get_tcp_session()
  • Loading branch information
Linus Torvalds committed Oct 29, 2009
2 parents 575c9ed + 8347a5c commit 36f8a53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,8 @@ cifs_get_tcp_session(struct smb_vol *volume_info)

out_err:
if (tcp_ses) {
kfree(tcp_ses->hostname);
if (!IS_ERR(tcp_ses->hostname))
kfree(tcp_ses->hostname);
if (tcp_ses->ssocket)
sock_release(tcp_ses->ssocket);
kfree(tcp_ses);
Expand Down

0 comments on commit 36f8a53

Please sign in to comment.