btrfs-progs/kernel-shared
Qu Wenruo 4a940ab2c0 btrfs-progs: fix a memory leak when starting a transaction on fs with error
Function btrfs_start_transaction() will allocate the memory
unconditionally, but if the fs has an aborted transaction we don't free
the allocated memory but return error directly.

Fix it by only allocate the new memory after all the checks.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-04-25 18:32:17 +02:00
..
backref.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
backref.h
ctree.c btrfs-progs: make all of the item/key_ptr offset helpers take an eb 2022-03-09 15:13:14 +01:00
ctree.h btrfs-progs: dump-tree: add print support for verity items 2022-03-24 00:49:19 +01:00
delayed-ref.c btrfs-progs: don't include btrfs-list.h unless necessary 2021-10-08 20:47:03 +02:00
delayed-ref.h
dir-item.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
disk-io.c btrfs-progs: make btrfs_create_tree take a key for the root key 2022-03-09 18:07:22 +01:00
disk-io.h btrfs-progs: make btrfs_create_tree take a key for the root key 2022-03-09 18:07:22 +01:00
extent-tree.c btrfs-progs: handle the per-block group global root id 2022-03-09 18:07:17 +01:00
extent_io.c btrfs-progs: introduce btrfs_pread wrapper for pread 2021-10-20 18:59:23 +02:00
extent_io.h
file-item.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
file.c
free-space-cache.c
free-space-cache.h
free-space-tree.c btrfs-progs: make btrfs_create_tree take a key for the root key 2022-03-09 18:07:22 +01:00
free-space-tree.h
inode-item.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
inode.c
print-tree.c btrfs-progs: dump-tree: add print support for verity items 2022-03-24 00:49:19 +01:00
print-tree.h
root-tree.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
send.h btrfs-progs: libbtrfs: replace SZ_ constants and drop sizes.h 2021-10-08 20:46:35 +02:00
transaction.c btrfs-progs: fix a memory leak when starting a transaction on fs with error 2022-04-25 18:32:17 +02:00
transaction.h
ulist.c
ulist.h
uuid-tree.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
volumes.c btrfs-progs: zoned: fix and simplify dev_extent_hole_check_zoned() 2022-04-08 23:17:35 +02:00
volumes.h btrfs-progs: make "btrfs filesystem df" command show upper case profile 2021-11-05 12:50:03 +01:00
zoned.c btrfs-progs: zoned: export sb_zone_number() and related constants 2022-04-08 23:17:35 +02:00
zoned.h btrfs-progs: zoned: export sb_zone_number() and related constants 2022-04-08 23:17:35 +02:00