diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-04-14 18:43:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:48:57 -0400 |
commit | e073fc58dfe6a4c9b614320c1d56bb71cb213ec4 (patch) | |
tree | 312f2d7e424362beb03ead1bdd39c50e5612b8c1 /fs | |
parent | d0ba25b905ba1246d04578cd59df83014e9b9152 (diff) |
ocfs2: dereferencing freed pointers in ocfs2_reflink()
The code at the "out" label assumes that "default_acl" and "acl" are NULL,
but actually the pointers can be NULL, unitialized, or freed.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/refcounttree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index ee541f92dab4..df3a500789c7 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -4276,7 +4276,7 @@ static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir, | |||
4276 | error = posix_acl_create(dir, &mode, &default_acl, &acl); | 4276 | error = posix_acl_create(dir, &mode, &default_acl, &acl); |
4277 | if (error) { | 4277 | if (error) { |
4278 | mlog_errno(error); | 4278 | mlog_errno(error); |
4279 | goto out; | 4279 | return error; |
4280 | } | 4280 | } |
4281 | 4281 | ||
4282 | error = ocfs2_create_inode_in_orphan(dir, mode, | 4282 | error = ocfs2_create_inode_in_orphan(dir, mode, |