diff --git a/system/physmem.c b/system/physmem.c index e862f99ff651066dc45f080373c0fbaac7fd44e6..9ccf195f6e12c47522ad4139f1107a72aaa6eb44 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -797,8 +797,8 @@ void cpu_address_space_destroy(CPUState *cpu, int asidx) memory_listener_unregister(&cpuas->tcg_as_listener); } + cpuas->as->free_in_rcu = true; address_space_destroy(cpuas->as); - g_free_rcu(cpuas->as, rcu); if (asidx == 0) { /* reset the convenience alias for address space 0 */