summaryrefslogtreecommitdiff
path: root/scripts/extract-vmlinux
diff options
context:
space:
mode:
authorJiasheng Jiang <jiashengjiangcool@gmail.com>2026-01-11 19:20:37 +0000
committerDavid Sterba <dsterba@suse.com>2026-01-12 16:21:55 +0100
commita11224a016d6d1d46a4d9b6573244448a80d4d7f (patch)
treeb6ad4ab4e89a1a1bf6d2f271af2a4d1195196f59 /scripts/extract-vmlinux
parent882680774933fd276023e01cf0261c2350d7201e (diff)
btrfs: fix memory leaks in create_space_info() error paths
In create_space_info(), the 'space_info' object is allocated at the beginning of the function. However, there are two error paths where the function returns an error code without freeing the allocated memory: 1. When create_space_info_sub_group() fails in zoned mode. 2. When btrfs_sysfs_add_space_info_type() fails. In both cases, 'space_info' has not yet been added to the fs_info->space_info list, resulting in a memory leak. Fix this by adding an error handling label to kfree(space_info) before returning. Fixes: 2be12ef79fe9 ("btrfs: Separate space_info create/update") Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/extract-vmlinux')
0 files changed, 0 insertions, 0 deletions