diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-26 22:24:32 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-26 22:24:32 +0300 |
commit | 7e63545264c3d1844189e47ac8a4dabc03e11d8b (patch) | |
tree | bfceb32f9adb59991e7facffd4fac73c2daa7949 /fs/btrfs | |
parent | 1bff7d7e8c487b9b0ceab70b43b781f1d45f55eb (diff) | |
parent | daf87e953527b03c0bd4c0f41d704ba71186256d (diff) | |
download | linux-7e63545264c3d1844189e47ac8a4dabc03e11d8b.tar.xz |
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()
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/lzo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c index 9febb8025825..0fb90cbe7669 100644 --- a/fs/btrfs/lzo.c +++ b/fs/btrfs/lzo.c @@ -290,6 +290,8 @@ int lzo_compress_pages(struct list_head *ws, struct address_space *mapping, *total_out = cur_out; *total_in = cur_in - start; out: + if (page_in) + put_page(page_in); *out_pages = DIV_ROUND_UP(cur_out, PAGE_SIZE); return ret; } |