[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/40] memory: fix address space initialization/dest
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 07/40] memory: fix address space initialization/destruction |
Date: |
Tue, 7 May 2013 16:16:45 +0200 |
From: Avi Kivity <address@hidden>
A couple of fields were left uninitialized. This was not observed earlier
because all address spaces were statically allocated. Also free allocation
for those fields.
Signed-off-by: Avi Kivity <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
memory.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/memory.c b/memory.c
index 7a956a0..fc4515b 100644
--- a/memory.c
+++ b/memory.c
@@ -1573,6 +1573,8 @@ void address_space_init(AddressSpace *as, MemoryRegion
*root)
as->root = root;
as->current_map = g_new(FlatView, 1);
flatview_init(as->current_map);
+ as->ioeventfd_nb = 0;
+ as->ioeventfds = NULL;
QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link);
as->name = NULL;
memory_region_transaction_commit();
@@ -1589,6 +1591,7 @@ void address_space_destroy(AddressSpace *as)
address_space_destroy_dispatch(as);
flatview_destroy(as->current_map);
g_free(as->current_map);
+ g_free(as->ioeventfds);
}
uint64_t io_mem_read(MemoryRegion *mr, hwaddr addr, unsigned size)
--
1.7.1
- [Qemu-devel] [PATCH 15/40] vfio: abort if an emulated iommu is used, (continued)
- [Qemu-devel] [PATCH 15/40] vfio: abort if an emulated iommu is used, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 05/40] memory: do not duplicate memory_region_destructor_none, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 30/40] misc: add memory_region_set_owner calls, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 22/40] dma: eliminate DMAContext, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 32/40] vga: add memory_region_set_owner calls, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 02/40] memory: allow memory_region_find() to run on non-root memory regions, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 18/40] spapr: use memory core for iommu support, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 24/40] memory: add getter/setter for owner, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 07/40] memory: fix address space initialization/destruction,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 17/40] spapr: make IOMMU translation go through IOMMUTLBEntry, Paolo Bonzini, 2013/05/07
- [Qemu-devel] [PATCH 40/40] memory: add reference counting to FlatView, Paolo Bonzini, 2013/05/07
[Qemu-devel] [PATCH 09/40] memory: create FlatView for new address spaces, Paolo Bonzini, 2013/05/07