Skip to content

Commit 9c689c8

Browse files
fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame()
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 32e9212 commit 9c689c8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

fs/ntfs3/attrib.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,10 +1736,8 @@ int attr_allocate_frame(struct ntfs_inode *ni, CLST frame, size_t compr_size,
17361736
le_b = NULL;
17371737
attr_b = ni_find_attr(ni, NULL, &le_b, ATTR_DATA, NULL,
17381738
0, NULL, &mi_b);
1739-
if (!attr_b) {
1740-
err = -ENOENT;
1741-
goto out;
1742-
}
1739+
if (!attr_b)
1740+
return -ENOENT;
17431741

17441742
attr = attr_b;
17451743
le = le_b;

0 commit comments

Comments
 (0)