mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
vfio/container: Move vfio_container_destroy() to an instance_finalize() handler
vfio_container_destroy() clears the resources allocated VFIOContainerBase object. Now that VFIOContainerBase is a QOM object, add an instance_finalize() handler to do the cleanup. It will be called through object_unref(). Suggested-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
b052f73cbe
commit
96b7af4388
4 changed files with 3 additions and 7 deletions
|
@ -237,7 +237,6 @@ static void iommufd_cdev_container_destroy(VFIOIOMMUFDContainer *container)
|
|||
return;
|
||||
}
|
||||
memory_listener_unregister(&bcontainer->listener);
|
||||
vfio_container_destroy(bcontainer);
|
||||
iommufd_backend_free_id(container->be, container->ioas_id);
|
||||
object_unref(container);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue