aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-29 09:02:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-29 09:02:01 -0700
commit36f8a53ff2626dbfc3c0a809fe1d2290937ddc96 (patch)
treebe3d72d55e4bc39a40c55b33e60ba4d942b48367 /fs
parentray_cs: Fix copy_from_user handling (diff)
parent[CIFS] Fixing to avoid invalid kfree() in cifs_get_tcp_session() (diff)
downloadlinux-dev-36f8a53ff2626dbfc3c0a809fe1d2290937ddc96.tar.xz
linux-dev-36f8a53ff2626dbfc3c0a809fe1d2290937ddc96.zip
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.c3
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)
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);