diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-03-13 11:17:29 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2018-03-13 11:17:29 -0600 |
commit | 92f86bff088dc6f0c0ed93b8e82d4d2459c35145 (patch) | |
tree | b194976192d38048b6f64a02d77d0a816816d485 /hw/vfio | |
parent | fc70514ccfde4c55ccc2a8e66ed2f2e4194b17b2 (diff) | |
download | qemu-92f86bff088dc6f0c0ed93b8e82d4d2459c35145.zip qemu-92f86bff088dc6f0c0ed93b8e82d4d2459c35145.tar.gz qemu-92f86bff088dc6f0c0ed93b8e82d4d2459c35145.tar.bz2 |
vfio/common: cleanup in vfio_region_finalize
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r-- | hw/vfio/common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c index f895e3c..6a8203a 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -858,6 +858,13 @@ void vfio_region_finalize(VFIORegion *region) g_free(region->mmaps); trace_vfio_region_finalize(region->vbasedev->name, region->nr); + + region->mem = NULL; + region->mmaps = NULL; + region->nr_mmaps = 0; + region->size = 0; + region->flags = 0; + region->nr = 0; } void vfio_region_mmaps_set_enabled(VFIORegion *region, bool enabled) |