Skip to content

Commit

Permalink
fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame()
Browse files Browse the repository at this point in the history
[ Upstream commit 9c689c8 ]

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
aalexandrovich authored and gregkh committed Nov 8, 2023
1 parent 3228a2e commit 0030ccd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions fs/ntfs3/attrib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1736,10 +1736,8 @@ int attr_allocate_frame(struct ntfs_inode *ni, CLST frame, size_t compr_size,
le_b = NULL;
attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL,
0, NULL, &mi_b);
if (!attr_b) {
err = -ENOENT;
goto out;
}
if (!attr_b)
return -ENOENT;

attr = attr_b;
le = le_b;
Expand Down

0 comments on commit 0030ccd

Please sign in to comment.