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

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
Konstantin Komarov 2023-09-26 11:19:08 +03:00
parent e52dce610a
commit 32e9212256
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6

View File

@ -2148,7 +2148,7 @@ int ni_readpage_cmpr(struct ntfs_inode *ni, struct page *page)
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);