btrfs: free cluster before exit
PATCH 1/1 btrfs: free cluster before exit
Fix possible memory leak.
Signed-off-by Alexander Beregalov <[email protected]>
--- fs/btrfs/relocation.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
fs/btrfs/relocation.c +3 -1
@@ -3281,8 +3281,10 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)return -ENOMEM ; path =btrfs_alloc_path (); -if (!path) +if (!path) { +kfree (cluster);return -ENOMEM ; + } rc->extents_found =0 ; rc->extents_skipped =0 ;
Signature · 1 line
1.6.6