Commit 20b135e4 authored by Dan Carpenter's avatar Dan Carpenter Committed by Steve French

cifs: Fix an error pointer dereference in cifs_mount()

The error handling calls kfree(full_path) so we can't let it be a NULL
pointer.  There used to be a NULL assignment here but we accidentally
deleted it.  Add it back.

Fixes: 7efd0815 ("cifs: document and cleanup dfs mount")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
parent 327a8d76
...@@ -4886,6 +4886,7 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol) ...@@ -4886,6 +4886,7 @@ int cifs_mount(struct cifs_sb_info *cifs_sb, struct smb_vol *vol)
full_path = build_unc_path_to_root(vol, cifs_sb, !!count); full_path = build_unc_path_to_root(vol, cifs_sb, !!count);
if (IS_ERR(full_path)) { if (IS_ERR(full_path)) {
rc = PTR_ERR(full_path); rc = PTR_ERR(full_path);
full_path = NULL;
break; break;
} }
/* Chase referral */ /* Chase referral */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment