Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Btrfs: fix double free in the btrfs_qgroup_account_ref()
The function btrfs_find_all_roots is responsible to allocate memory for 'roots' and free it if errors happen,so the caller should not free it again since the work has been done. Besides,'tmp' is allocated after the function btrfs_find_all_roots, so we can return directly if btrfs_find_all_roots() fails. Signed-off-by: Wang Shilong <[email protected]> Reviewed-by: Miao Xie <[email protected]> Reviewed-by: Jan Schmidt <[email protected]> Signed-off-by: Josef Bacik <[email protected]>
- Loading branch information