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 --- fs/cifs/connect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 8d95607a9312..196ef9ec69db 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3480,7 +3480,8 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx) goto error; } spin_lock(&cifs_tcp_ses_lock); - tcon->dfs_path = ref_path; + if (tcon) + tcon->dfs_path = ref_path; ref_path = NULL; spin_unlock(&cifs_tcp_ses_lock); -- Thanks, Steve