mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 00:39:48 +00:00
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 <stfrench@microsoft.com>
This commit is contained in:
parent
a5628263a9
commit
162004a2f7
1 changed files with 1 additions and 1 deletions
|
@ -3451,7 +3451,7 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb3_fs_context *ctx)
|
|||
rc = -ELOOP;
|
||||
} while (rc == -EREMOTE);
|
||||
|
||||
if (rc)
|
||||
if (rc || !tcon)
|
||||
goto error;
|
||||
|
||||
kfree(ref_path);
|
||||
|
|
Loading…
Reference in a new issue