]> Git Repo - linux.git/commitdiff
[SMB3] Missing null tcon check
authorSteve French <[email protected]>
Sat, 26 Sep 2015 14:48:58 +0000 (09:48 -0500)
committerSteve French <[email protected]>
Sat, 26 Sep 2015 14:48:58 +0000 (09:48 -0500)
Pointed out by Dan Carpenter via smatch code analysis tool

CC: Dan Carpenter <[email protected]>
Signed-off-by: Steve French <[email protected]>
fs/cifs/smb2pdu.c

index ce83e2edbe0a22ae9858ec5a04caa4e2b6ad59d2..597a417ba94d3bb910f52e3f14119a197ff2d090 100644 (file)
@@ -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;
This page took 0.049911 seconds and 4 git commands to generate.