summaryrefslogtreecommitdiffstats
path: root/softmmu/memory_mapping.c
diff options
context:
space:
mode:
Diffstat (limited to 'softmmu/memory_mapping.c')
-rw-r--r--softmmu/memory_mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c
index 8320165ea2..f6f0a829fd 100644
--- a/softmmu/memory_mapping.c
+++ b/softmmu/memory_mapping.c
@@ -42,7 +42,7 @@ static void create_new_memory_mapping(MemoryMappingList *list,
{
MemoryMapping *memory_mapping;
- memory_mapping = g_malloc(sizeof(MemoryMapping));
+ memory_mapping = g_new(MemoryMapping, 1);
memory_mapping->phys_addr = phys_addr;
memory_mapping->virt_addr = virt_addr;
memory_mapping->length = length;