Re: [PATCH 1/2] Btrfs: fix double free in the btrfs_qgroup_account_ref()

2013-03-25 Thread Jan Schmidt
On Mon, March 25, 2013 at 12:08 (+0100), Wang Shilong wrote: > From: Wang Shilong > > 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 alloca

[PATCH 1/2] Btrfs: fix double free in the btrfs_qgroup_account_ref()

2013-03-25 Thread Wang Shilong
From: Wang Shilong 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 bt