Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff9f84b7 authored by Steve French's avatar Steve French
Browse files

[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: default avatarSteve French <steve.french@primarydata.com>
parent e3be4266
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;