Skip to content

Commit 7e63545

Browse files
committed
Merge tag 'for-5.16-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux
Pull btrfs fix from David Sterba: "One more fix to the lzo code, a missing put_page causing memory leaks when some error branches are taken" * tag 'for-5.16-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix the memory leak caused in lzo_compress_pages()
2 parents 1bff7d7 + daf87e9 commit 7e63545

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/btrfs/lzo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ int lzo_compress_pages(struct list_head *ws, struct address_space *mapping,
290290
*total_out = cur_out;
291291
*total_in = cur_in - start;
292292
out:
293+
if (page_in)
294+
put_page(page_in);
293295
*out_pages = DIV_ROUND_UP(cur_out, PAGE_SIZE);
294296
return ret;
295297
}

0 commit comments

Comments
 (0)