aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorChristian Engelmayer <[email protected]>2015-05-02 17:19:55 +0200
committerChris Mason <[email protected]>2015-06-02 19:34:35 -0700
commitab3680dd18f3dea341e32e5020ef16d54a4fb66f (patch)
tree4f84ca683181984c54a2073b521470db0faf9311 /net/switchdev/switchdev.c
parent35c766425adc8e6cd1bdc8554fa540364f218fb7 (diff)
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 <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions