diff options
author | Qiushi Wu <[email protected]> | 2020-05-27 21:01:09 -0500 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2020-05-29 16:07:18 -0600 |
commit | aa8ba13cae3134b8ef1c1b6879f66372531da738 (patch) | |
tree | 30ca75c2574dc9e4ed9fac9bd7cd438e2a87bd8e /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 9cb1fd0efd195590b828b9b865421ad345a4a145 (diff) |
vfio/mdev: Fix reference count leak in add_mdev_supported_type
kobject_init_and_add() takes reference even when it fails.
If this function returns an error, kobject_put() must be called to
properly clean up the memory associated with the object. Thus,
replace kfree() by kobject_put() to fix this issue. Previous
commit "b8eb718348b8" fixed a similar problem.
Fixes: 7b96953bc640 ("vfio: Mediated device Core driver")
Signed-off-by: Qiushi Wu <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Reviewed-by: Kirti Wankhede <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions