Skip to content

Commit 162004a

Browse files
committed
cifs: missing null pointer check in cifs_mount
We weren't checking if tcon is null before setting dfs path, although we check for null tcon in an earlier assignment statement. Addresses-Coverity: 1476411 ("Dereference after null check") Signed-off-by: Steve French <[email protected]>
1 parent a562826 commit 162004a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3451,7 +3451,7 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx)
34513451
rc = -ELOOP;
34523452
} while (rc == -EREMOTE);
34533453

3454-
if (rc)
3454+
if (rc || !tcon)
34553455
goto error;
34563456

34573457
kfree(ref_path);

0 commit comments

Comments
 (0)