[PATCH] CIFS: session servername can't be null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(updated incorporating a suggestion of Jeff's)

remove impossible check

Pointed out by Coverity (CID 115422)

Signed-off-by: Steve French <smfrench@xxxxxxxxx>
Reviewed-by: Jeff Layton <jlayton@xxxxxxxxx>
---
 fs/cifs/cifsencrypt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c
index 4ac7445..aa0dc25 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@xxxxxxxxxx)
  *
@@ -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);

-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux