[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/30] memory: fix address space initialization/dest
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 11/30] memory: fix address space initialization/destruction |
Date: |
Tue, 21 May 2013 12:57:12 +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 file changed, 3 insertions(+)
diff --git a/memory.c b/memory.c
index 11bbeb7..9478f98 100644
--- a/memory.c
+++ b/memory.c
@@ -1572,6 +1572,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();
@@ -1588,6 +1590,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.8.1.4
- [Qemu-devel] [PATCH 05/30] memory: assert that PhysPageEntry's ptr does not overflow, (continued)
- [Qemu-devel] [PATCH 05/30] memory: assert that PhysPageEntry's ptr does not overflow, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 06/30] memory: allow memory_region_find() to run on non-root memory regions, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 07/30] memory: Replace open-coded memory_region_is_romd, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 08/30] memory: Rename readable flag to romd_mode, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 09/30] memory: do not duplicate memory_region_destructor_none, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 10/30] memory: make memory_global_sync_dirty_bitmap take an AddressSpace, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 11/30] memory: fix address space initialization/destruction,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 12/30] s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 13/30] memory: limit sections in the radix tree to the actual address space size, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 14/30] memory: create FlatView for new address spaces, Paolo Bonzini, 2013/05/21
- [Qemu-devel] [PATCH 15/30] memory: add address_space_valid, Paolo Bonzini, 2013/05/21