diff options
author | Miquel Sabaté Solà <mssola@mssola.com> | 2025-10-08 14:18:59 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-10-13 22:35:14 +0200 |
commit | fec9b9d3ced39f16be8d7afdf81f4dd2653da319 (patch) | |
tree | 0ff69160ba481986ff42a100beaa72ea8ba9719c /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 8ab2fa69691b2913a67f3c54fbb991247b3755be (diff) |
btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST
At the end of btrfs_load_block_group_zone_info() the first thing we do
is to ensure that if the mapping type is not a SINGLE one and there is
no RAID stripe tree, then we return early with an error.
Doing that, though, prevents the code from running the last calls from
this function which are about freeing memory allocated during its
run. Hence, in this case, instead of returning early, we set the ret
value and fall through the rest of the cleanup code.
Fixes: 5906333cc4af ("btrfs: zoned: don't skip block group profile checks on conventional zones")
CC: stable@vger.kernel.org # 6.8+
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions