diff options
author | Filipe Manana <fdmanana@suse.com> | 2020-07-29 12:17:50 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-08-10 19:58:30 +0300 |
commit | 4f26433e9b3eb7a55ed70d8f882ae9cd48ba448b (patch) | |
tree | 7f380a62ef3fb328e06ae5afce8e3e6946bdd017 /scripts/bpf_helpers_doc.py | |
parent | 3ef3959b29c4a5bd65526ab310a1a18ae533172a (diff) | |
download | linux-4f26433e9b3eb7a55ed70d8f882ae9cd48ba448b.tar.xz |
btrfs: fix memory leaks after failure to lookup checksums during inode logging
While logging an inode, at copy_items(), if we fail to lookup the checksums
for an extent we release the destination path, free the ins_data array and
then return immediately. However a previous iteration of the for loop may
have added checksums to the ordered_sums list, in which case we leak the
memory used by them.
So fix this by making sure we iterate the ordered_sums list and free all
its checksums before returning.
Fixes: 3650860b90cc2a ("Btrfs: remove almost all of the BUG()'s from tree-log.c")
CC: stable@vger.kernel.org # 4.4+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions