Skip to content

Commit 31deac6

Browse files
committed
cifs: missing null pointer check in cifs_mount
jira LE-1907 Rebuild_History Non-Buildable kernel-4.18.0-477.27.1.el8_8 commit-author Steve French <stfrench@microsoft.com> commit 162004a 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 <stfrench@microsoft.com> (cherry picked from commit 162004a) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 0b44a06 commit 31deac6

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
@@ -3458,7 +3458,7 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx)
34583458
rc = -ELOOP;
34593459
} while (rc == -EREMOTE);
34603460

3461-
if (rc)
3461+
if (rc || !tcon)
34623462
goto error;
34633463

34643464
kfree(ref_path);

0 commit comments

Comments
 (0)