aboutsummaryrefslogtreecommitdiff
path: root/fs/ntfs3
diff options
context:
space:
mode:
authorKonstantin Komarov2023-09-26 11:28:11 +0300
committerGreg Kroah-Hartman2023-11-08 14:10:59 +0100
commit3bff4bb7f9c7d551c36d20d6763ba5187c17bae9 (patch)
tree68c63411a5039c312b23b17c18305705a224a524 /fs/ntfs3
parentc8cbae3cbbc4b11ba5970765dee1c4d6759d0be5 (diff)
fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame()
[ Upstream commit 9c689c8dc86f8ca99bf91c05f24c8bab38fe7d5f ] Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/ntfs3')
-rw-r--r--fs/ntfs3/attrib.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c
index 63169529b52c..2215179c925b 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -1658,10 +1658,8 @@ repack:
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;