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: 460bbf2990 ("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>
This commit is contained in:
Dan Carpenter 2022-08-08 11:34:41 +03:00 committed by Konstantin Komarov
parent 96964352e2
commit d4073595d0
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6
1 changed files with 1 additions and 1 deletions

View File

@ -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;