diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index fd318a122daf84773a116fcbdc4f743c01e7b3a2..7bff62c2c322c5c16a6d187a44c24670123c6dee 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -4049,6 +4049,7 @@ static void vfio_put_device(VFIODevice *vdev) DPRINTF("vfio_put_device: close vdev->fd\n"); close(vdev->fd); if (vdev->msix) { + object_unparent(OBJECT(&vdev->msix->mmap_mem)); g_free(vdev->msix); vdev->msix = NULL; }