Home
last modified time | relevance | path

Searched hist:ab3680dd18f3dea341e32e5020ef16d54a4fb66f (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/btrfs/
H A Dqgroup.cdiff ab3680dd18f3dea341e32e5020ef16d54a4fb66f Sat May 02 10:19:55 CDT 2015 Christian Engelmayer <cengelma@gmx.at> btrfs: qgroup: Fix possible leak in btrfs_add_qgroup_relation()

Commit 9c8b35b1ba21 ("btrfs: quota: Automatically update related qgroups or
mark INCONSISTENT flags when assigning/deleting a qgroup relations.")
introduced the allocation of a temporary ulist in function
btrfs_add_qgroup_relation() and added the corresponding cleanup to the out
path. However, the allocation was introduced before the src/dst level check
that directly returns. Fix the possible leakage of the ulist by moving the
allocation after the input validation. Detected by Coverity CID 1295988.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>