diff --git a/exec.c b/exec.c index 26469120d9..efeca147e7 100644 --- a/exec.c +++ b/exec.c @@ -1229,9 +1229,11 @@ void qemu_ram_free(ram_addr_t addr) ; } else if (xen_enabled()) { xen_invalidate_map_cache_entry(block->host); +#ifndef _WIN32 } else if (block->fd >= 0) { munmap(block->host, block->length); close(block->fd); +#endif } else { qemu_anon_ram_free(block->host, block->length); }