fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr()

[ Upstream commit 32e9212256 ]

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Konstantin Komarov 2023-09-26 11:19:08 +03:00 committed by Greg Kroah-Hartman
parent 6fe32f79ab
commit c8cbae3cbb

View File

@ -2149,7 +2149,7 @@ out1:
for (i = 0; i < pages_per_frame; i++) {
pg = pages[i];
if (i == idx)
if (i == idx || !pg)
continue;
unlock_page(pg);
put_page(pg);