projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a562826
)
cifs: missing null pointer check in cifs_mount
author
Steve French
<stfrench@microsoft.com>
Thu, 24 Jun 2021 00:32:24 +0000
(19:32 -0500)
committer
Steve French
<stfrench@microsoft.com>
Thu, 24 Jun 2021 00:32:24 +0000
(19:32 -0500)
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>
fs/cifs/connect.c
patch
|
blob
|
history
diff --git
a/fs/cifs/connect.c
b/fs/cifs/connect.c
index 8d95607a9312b1eab6c85a1690fc4992f5d122cd..c8079376d294351d401dd94ed8ede385b3b3fb5c 100644
(file)
--- a/
fs/cifs/connect.c
+++ b/
fs/cifs/connect.c
@@
-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);