summaryrefslogtreecommitdiff
path: root/fs/cifs/smb2pdu.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2015-09-26 17:48:58 +0300
committerSteve French <smfrench@gmail.com>2015-09-26 17:48:58 +0300
commitff9f84b7d79ddccab4c293c9d3e289f95ae594f7 (patch)
tree26a7bc8c601b02632b7fbccf30fdae1de8f704bd /fs/cifs/smb2pdu.c
parente3be4266d3488cbbaddf7fcc661f4473db341e46 (diff)
downloadlinux-ff9f84b7d79ddccab4c293c9d3e289f95ae594f7.tar.xz
[SMB3] Missing null tcon check
Pointed out by Dan Carpenter via smatch code analysis tool CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Steve French <steve.french@primarydata.com>
Diffstat (limited to 'fs/cifs/smb2pdu.c')
-rw-r--r--fs/cifs/smb2pdu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index ce83e2edbe0a..597a417ba94d 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -922,7 +922,7 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree,
if (tcon && tcon->bad_network_name)
return -ENOENT;
- if ((tcon->seal) &&
+ if ((tcon && tcon->seal) &&
((ses->server->capabilities & SMB2_GLOBAL_CAP_ENCRYPTION) == 0)) {
cifs_dbg(VFS, "encryption requested but no server support");
return -EOPNOTSUPP;