X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_mem.c;h=c43dcae3c4063ff075f0171d48fdf8c98bdaf092;hb=bdbff6b6e5f78f5a1689f5d77814196ee2e4f6cb;hp=64c83c75d0c2cd85e41424378ce30f3c375a6b0c;hpb=559b7a07d8d5d783f0f2c2a64820ceaeda834a9e;p=palacios.git diff --git a/palacios/src/palacios/vmm_mem.c b/palacios/src/palacios/vmm_mem.c index 64c83c7..c43dcae 100644 --- a/palacios/src/palacios/vmm_mem.c +++ b/palacios/src/palacios/vmm_mem.c @@ -414,13 +414,13 @@ void v3_delete_mem_region(struct v3_vm_info * vm, struct v3_mem_region * reg) { v3_rb_erase(&(reg->tree_node), &(vm->mem_map.mem_regions)); - V3_Free(reg); // If the guest isn't running then there shouldn't be anything to invalidate. // Page tables should __always__ be created on demand during execution // NOTE: This is a sanity check, and can be removed if that assumption changes if (vm->run_state != VM_RUNNING) { + V3_Free(reg); return; } @@ -457,6 +457,8 @@ void v3_delete_mem_region(struct v3_vm_info * vm, struct v3_mem_region * reg) { } } + V3_Free(reg); + // flush virtual page tables // 3 cases shadow, shadow passthrough, and nested