Replace g_new0() + address_space_init() by address_space_create(). Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> --- softmmu/physmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 3c1912a1a07..cd8b670a731 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -727,12 +727,12 @@ void cpu_address_space_init(CPUState *cpu, int asidx, const char *prefix, MemoryRegion *mr) { CPUAddressSpace *newas; - AddressSpace *as = g_new0(AddressSpace, 1); + AddressSpace *as; char *as_name; assert(mr); as_name = g_strdup_printf("%s-%d", prefix, cpu->cpu_index); - address_space_init(as, mr, as_name); + as = address_space_create(mr, as_name); g_free(as_name); /* Target code should have set num_ases before calling us */ -- 2.31.1