diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2023-09-26 11:28:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-08 17:26:46 +0100 |
commit | 94524980ee7548d000865ae3bc1b74426ce8db30 (patch) | |
tree | 1a1a92b2c4478371b22f478e61ce95fc5cfc2cac /fs/ntfs3/attrib.c | |
parent | 2de328398b50380295448181f4a06bf879ec748e (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/attrib.c')
-rw-r--r-- | fs/ntfs3/attrib.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ntfs3/attrib.c b/fs/ntfs3/attrib.c index 321d55b3ca17..1d5ac2164d94 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; |