aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2023-09-26 11:28:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-08 17:26:46 +0100
commit94524980ee7548d000865ae3bc1b74426ce8db30 (patch)
tree1a1a92b2c4478371b22f478e61ce95fc5cfc2cac
parent2de328398b50380295448181f4a06bf879ec748e (diff)
downloadaa-94524980ee7548d000865ae3bc1b74426ce8db30.tar.gz
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>
-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 321d55b3ca17d2..1d5ac2164d94f2 100644
--- a/fs/ntfs3/attrib.c
+++ b/fs/ntfs3/attrib.c
@@ -1583,10 +1583,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;