Re: [PATCH] btrfs: fix leak in qgroup_subtree_accounting() error path

2014-08-19 Thread Chris Mason
On 08/18/2014 05:42 PM, Mark Fasheh wrote: On Sun, Aug 17, 2014 at 03:09:21PM -0500, Eric Sandeen wrote: Coverity pointed this out; in the newly added qgroup_subtree_accounting(), if btrfs_find_all_roots() returns an error, we leak at least the parents pointer, and possibly the roots

Re: [PATCH] btrfs: fix leak in qgroup_subtree_accounting() error path

2014-08-18 Thread Mark Fasheh
On Sun, Aug 17, 2014 at 03:09:21PM -0500, Eric Sandeen wrote: Coverity pointed this out; in the newly added qgroup_subtree_accounting(), if btrfs_find_all_roots() returns an error, we leak at least the parents pointer, and possibly the roots pointer, depending on what failure occurs. If

[PATCH] btrfs: fix leak in qgroup_subtree_accounting() error path

2014-08-17 Thread Eric Sandeen
Coverity pointed this out; in the newly added qgroup_subtree_accounting(), if btrfs_find_all_roots() returns an error, we leak at least the parents pointer, and possibly the roots pointer, depending on what failure occurs. If btrfs_find_all_roots() returns an error, we need to free up all

Re: [PATCH] btrfs: fix leak in qgroup_subtree_accounting() error path

2014-08-17 Thread Eric Sandeen
On 8/17/14, 3:09 PM, Eric Sandeen wrote: Coverity pointed this out; in the newly added qgroup_subtree_accounting(), if btrfs_find_all_roots() returns an error, we leak at least the parents pointer, and possibly the roots pointer, depending on what failure occurs. FWIW, Coverity also doesn't