aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/vfio.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/vfio.c')
-rw-r--r--hw/misc/vfio.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index af9ae1fedf..813c2cc5c5 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -2857,15 +2857,11 @@ static void vfio_unmap_bar(VFIODevice *vdev, int nr)
memory_region_del_subregion(&bar->mem, &bar->mmap_mem);
munmap(bar->mmap, memory_region_size(&bar->mmap_mem));
- memory_region_destroy(&bar->mmap_mem);
if (vdev->msix && vdev->msix->table_bar == nr) {
memory_region_del_subregion(&bar->mem, &vdev->msix->mmap_mem);
munmap(vdev->msix->mmap, memory_region_size(&vdev->msix->mmap_mem));
- memory_region_destroy(&vdev->msix->mmap_mem);
}
-
- memory_region_destroy(&bar->mem);
}
static int vfio_mmap_bar(VFIODevice *vdev, VFIOBAR *bar,
@@ -3018,9 +3014,6 @@ static void vfio_unmap_bars(VFIODevice *vdev)
if (vdev->has_vga) {
vfio_vga_quirk_teardown(vdev);
pci_unregister_vga(&vdev->pdev);
- memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_MEM].mem);
- memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_IO_LO].mem);
- memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_IO_HI].mem);
}
}