Fix use after free in vfio_migration_probe
authorKirti Wankhede <kwankhede@nvidia.com>
Fri, 6 Nov 2020 18:02:24 +0000 (23:32 +0530)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 12 Nov 2020 22:58:16 +0000 (15:58 -0700)
commite408aeef8663fd6e3075aef252404c55d710a75e
tree5c6594e4754d67dad8fb72306d1976e9995f9e42
parentcb5d19e8294486551c422759260883ed290226d9
Fix use after free in vfio_migration_probe

Fixes Coverity issue:
CID 1436126:  Memory - illegal accesses  (USE_AFTER_FREE)

Fixes: a9e271ec9b36 ("vfio: Add migration region initialization and finalize function")
Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Reviewed-by: David Edmondson <dme@dme.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/migration.c