From d8d95814609e89e5438a3318a647ec322fc4ff16 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 11 Jun 2014 12:42:01 +0200 Subject: memory: convert memory_region_destroy to object_unparent Explicitly call object_unparent in the few places where we will re-create the memory region. If the memory region is simply being destroyed as part of device teardown, let QOM handle it. Signed-off-by: Paolo Bonzini --- ioport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ioport.c') diff --git a/ioport.c b/ioport.c index dce94a3..783a3ae 100644 --- a/ioport.c +++ b/ioport.c @@ -154,7 +154,7 @@ void portio_list_destroy(PortioList *piolist) for (i = 0; i < piolist->nr; ++i) { mrpio = container_of(piolist->regions[i], MemoryRegionPortioList, mr); - memory_region_destroy(&mrpio->mr); + object_unparent(OBJECT(&mrpio->mr)); g_free(mrpio); } g_free(piolist->regions); -- cgit v1.1