diff options
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8b8fe9b373f2..20d75b8ddb26 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2228,7 +2228,7 @@ static int match_session(struct cifs_ses *ses, struct smb_vol *vol) | |||
2228 | vol->username ? vol->username : "", | 2228 | vol->username ? vol->username : "", |
2229 | CIFS_MAX_USERNAME_LEN)) | 2229 | CIFS_MAX_USERNAME_LEN)) |
2230 | return 0; | 2230 | return 0; |
2231 | if (strlen(vol->username) != 0 && | 2231 | if ((vol->username && strlen(vol->username) != 0) && |
2232 | ses->password != NULL && | 2232 | ses->password != NULL && |
2233 | strncmp(ses->password, | 2233 | strncmp(ses->password, |
2234 | vol->password ? vol->password : "", | 2234 | vol->password ? vol->password : "", |