Message ID | 1242604701-16680-1-git-send-email-jlayton@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index ea9d11e..b103164 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c @@ -110,7 +110,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) int rc = -EACCES; int xid; char *full_path = NULL; - char *target_path = ERR_PTR(-ENOMEM); + char *target_path = NULL; struct cifs_sb_info *cifs_sb; struct cifsTconInfo *pTcon;
It's possible for CIFSSMBQueryUnixSymLink to return without setting target_path to a valid pointer. If that happens then the current value to which we're initializing this pointer could cause an oops when it's kfree'd. Signed-off-by: Jeff Layton <jlayton@redhat.com> --- fs/cifs/link.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)