From: Konstantin Komarov Date: Tue, 26 Sep 2023 08:28:11 +0000 (+0300) Subject: fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame() X-Git-Tag: v6.1.68~1191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bff4bb7f9c7d551c36d20d6763ba5187c17bae9;p=platform%2Fkernel%2Flinux-starfive.git fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame() [ Upstream commit 9c689c8dc86f8ca99bf91c05f24c8bab38fe7d5f ] Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin --- diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c index 6316952..2215179 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;