Some devices do not support a simple object_new/object_unref sequence because they leave dangling pointers under /machine. This series fixes this, for the case where the dangling pointers come from the memory API.
Patch 1 avoids an assertion failure. Patches 2 and 3 fix the devices that Markus reported. Paolo Paolo Bonzini (3): memory: allow destroying a non-empty MemoryRegion hw: do not pass NULL to memory_region_init from instance_init macio: move DBDMA_init from instance_init to realize hw/arm/pxa2xx.c | 2 +- hw/display/cg3.c | 4 ++-- hw/display/tcx.c | 2 +- hw/misc/arm_integrator_debug.c | 2 +- hw/misc/macio/cuda.c | 2 +- hw/misc/macio/macio.c | 14 +++++++------- memory.c | 17 ++++++++++++++++- 7 files changed, 29 insertions(+), 14 deletions(-) -- 2.5.0