summaryrefslogtreecommitdiffstats
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
parent575c9ed7798218dc923f319c0d78f0c25ca506b9 (diff)
parent8347a5cdd1422eea0470ed586274c7f29e274b47 (diff)
downloadop-kernel-dev-36f8a53ff2626dbfc3c0a809fe1d2290937ddc96.zip
op-kernel-dev-36f8a53ff2626dbfc3c0a809fe1d2290937ddc96.tar.gz
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()
-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 43003e0..b090980 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);
OpenPOWER on IntegriCloud