diff options
author | Colin Ian King <[email protected]> | 2021-06-22 19:37:10 +0100 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2021-06-24 13:31:28 -0600 |
commit | 0af5160edb87b1868eba514422d3991628a018f8 (patch) | |
tree | eedc52ba9a1f75838a01ef6a3845ed080987127c /tools/testing/selftests/bpf/progs | |
parent | c7396f2eac2bf9d767d9cf49bd26224fbb894aaf (diff) |
vfio/mdpy: Fix memory leak of object mdev_state->vconfig
In the case where the call to vfio_register_group_dev fails the error
return path kfree's mdev_state but not mdev_state->vconfig. Fix this
by kfree'ing mdev_state->vconfig before returning.
Addresses-Coverity: ("Resource leak")
Fixes: 437e41368c01 ("vfio/mdpy: Convert to use vfio_register_group_dev()")
Signed-off-by: Colin Ian King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs')
0 files changed, 0 insertions, 0 deletions