summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2015-03-31 00:58:17 +0300
committerSteve French <smfrench@gmail.com>2015-04-01 08:01:47 +0300
commit8b7a454443bdb73df4fd200af7f013f3319a3855 (patch)
tree4154b120473bafed9055857642c05169f43fc5bf /fs
parentc85c35f8fc1d3f5ca60cd713f10af387de73cb94 (diff)
downloadlinux-8b7a454443bdb73df4fd200af7f013f3319a3855.tar.xz
CIFS: session servername can't be null
remove impossible check Pointed out by Coverity (CID 115422) Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Jeff Layton <jlayton@samba.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifsencrypt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 4ac7445e6ec7..aa0dc2573374 100644
--- a/fs/cifs/cifsencrypt.c
+++ b/fs/cifs/cifsencrypt.c
@@ -1,6 +1,9 @@
/*
* fs/cifs/cifsencrypt.c
*
+ * Encryption and hashing operations relating to NTLM, NTLMv2. See MS-NLMP
+ * for more detailed information
+ *
* Copyright (C) International Business Machines Corp., 2005,2013
* Author(s): Steve French (sfrench@us.ibm.com)
*
@@ -515,7 +518,8 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
__func__);
return rc;
}
- } else if (ses->serverName) {
+ } else {
+ /* We use ses->serverName if no domain name available */
len = strlen(ses->serverName);
server = kmalloc(2 + (len * 2), GFP_KERNEL);