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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 btrfs_find_all_roots() returns an error, we need to
> free up all allocations before we return.  "roots" is
> initialized to NULL, so it should be safe to free
> it unconditionally (ulist_free() handles that case).

Great, thanks for this Eric.

Reviewed-by: Mark Fasheh <mfasheh@xxxxxxx>

--
Mark Fasheh
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux