diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-29 12:02:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-29 12:02:01 -0400 |
commit | 36f8a53ff2626dbfc3c0a809fe1d2290937ddc96 (patch) | |
tree | be3d72d55e4bc39a40c55b33e60ba4d942b48367 /fs | |
parent | 575c9ed7798218dc923f319c0d78f0c25ca506b9 (diff) | |
parent | 8347a5cdd1422eea0470ed586274c7f29e274b47 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] Fixing to avoid invalid kfree() in cifs_get_tcp_session()
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 43003e0bef18..b09098079916 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1577,7 +1577,8 @@ cifs_get_tcp_session(struct smb_vol *volume_info) | |||
1577 | 1577 | ||
1578 | out_err: | 1578 | out_err: |
1579 | if (tcp_ses) { | 1579 | if (tcp_ses) { |
1580 | kfree(tcp_ses->hostname); | 1580 | if (!IS_ERR(tcp_ses->hostname)) |
1581 | kfree(tcp_ses->hostname); | ||
1581 | if (tcp_ses->ssocket) | 1582 | if (tcp_ses->ssocket) |
1582 | sock_release(tcp_ses->ssocket); | 1583 | sock_release(tcp_ses->ssocket); |
1583 | kfree(tcp_ses); | 1584 | kfree(tcp_ses); |