summaryrefslogtreecommitdiff
path: root/hw/misc/vfio.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/vfio.c')
-rw-r--r--hw/misc/vfio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index fd318a122d..7bff62c2c3 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;
}