fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame()
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 26 Sep 2023 08:28:11 +0000 (11:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2023 13:10:59 +0000 (14:10 +0100)
[ Upstream commit 9c689c8dc86f8ca99bf91c05f24c8bab38fe7d5f ]

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ntfs3/attrib.c

index 63169529b52c499dbbc3d2144e794935ca6b3194..2215179c925b3f225f17bf4a49b392cd53ca9228 100644 (file)
@@ -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;