projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1aab02
)
cifs: NULL dereference on allocation failure
author
Dan Carpenter
<
[email protected]
>
Tue, 24 Jan 2012 08:39:22 +0000
(11:39 +0300)
committer
Steve French
<
[email protected]
>
Tue, 24 Jan 2012 16:37:19 +0000
(10:37 -0600)
We should just return directly here, the goto causes a NULL dereference.
Signed-off-by: Dan Carpenter <
[email protected]
>
Reviewed-by: Jeff Layton <
[email protected]
>
Signed-off-by: Steve French <
[email protected]
>
fs/cifs/connect.c
patch
|
blob
|
history
diff --git
a/fs/cifs/connect.c
b/fs/cifs/connect.c
index 986709a8d903294347a9b13fb3f61852f3877e7d..026d6464335bd1e9af8a278eadc2e339212cf6a9 100644
(file)
--- a/
fs/cifs/connect.c
+++ b/
fs/cifs/connect.c
@@
-3857,10
+3857,8
@@
cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
struct smb_vol *vol_info;
vol_info = kzalloc(sizeof(*vol_info), GFP_KERNEL);
- if (vol_info == NULL) {
- tcon = ERR_PTR(-ENOMEM);
- goto out;
- }
+ if (vol_info == NULL)
+ return ERR_PTR(-ENOMEM);
vol_info->local_nls = cifs_sb->local_nls;
vol_info->linux_uid = fsuid;