summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-08-08 11:34:41 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-08-10 19:12:58 +0300
commitd4073595d0c61463ec3a87411b19e2a90f76d3f8 (patch)
treeb2f3be4bbd62083e7ccc0cfe4c8cab4320ad9084 /fs
parent96964352e21962f5e51ecad87527ae9b6fec9670 (diff)
downloadlinux-d4073595d0c61463ec3a87411b19e2a90f76d3f8.tar.bz2
fs/ntfs3: uninitialized variable in ntfs_set_acl_ex()
The goto out calls kfree(value) on an uninitialized pointer. Just return directly as the other error paths do. Fixes: 460bbf2990b3 ("fs/ntfs3: Do not change mode if ntfs_set_ea failed") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ntfs3/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c
index 02f6a933ee79..5bdff12a1232 100644
--- a/fs/ntfs3/xattr.c
+++ b/fs/ntfs3/xattr.c
@@ -568,7 +568,7 @@ static noinline int ntfs_set_acl_ex(struct user_namespace *mnt_userns,
err = posix_acl_update_mode(mnt_userns, inode, &mode,
&acl);
if (err)
- goto out;
+ return err;
}
name = XATTR_NAME_POSIX_ACL_ACCESS;
name_len = sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1;