squashfs: free page if bio_add_page fails
PATCH 1/1 squashfs: free page if bio_add_page fails
In squashfs_bio_read, the page recently allocated for use with bio_add_page isn't freed when the call fails.
This patch adds a call to __free_page.
Signed-off-by Leon M. George <[email protected]>
--- fs/squashfs/block.c | 1 + 1 file changed, 1 insertion(+)
fs/squashfs/block.c +1 -0
@@ -110,6 +110,7 @@ static int squashfs_bio_read(struct super_block *sb, u64 index, int length, }if (!bio_add_page (bio, page, len, offset)) { error = -EIO ; +__free_page (page); goto out_free_bio; } offset =0 ;
Signature · 1 line
2.35.1