Skip to content

Commit

Permalink
fs/ntfs3: uninitialized variable in ntfs_set_acl_ex()
Browse files Browse the repository at this point in the history
The goto out calls kfree(value) on an uninitialized pointer.  Just
return directly as the other error paths do.

Fixes: 460bbf2 ("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>
  • Loading branch information
Dan Carpenter authored and Konstantin Komarov committed Aug 10, 2022
1 parent 9696435 commit d407359
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ntfs3/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d407359

Please sign in to comment.