]> Git Repo - qemu.git/blobdiff - exec.c
mmap-alloc: fix hugetlbfs misaligned length in ppc64
[qemu.git] / exec.c
diff --git a/exec.c b/exec.c
index 25f3938a271659887be66d501f78597b7b6eea31..03dd673d36d8ab4fcee56471abfbca81cf289c3e 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1873,7 +1873,7 @@ static void *file_ram_alloc(RAMBlock *block,
     if (mem_prealloc) {
         os_mem_prealloc(fd, area, memory, smp_cpus, errp);
         if (errp && *errp) {
-            qemu_ram_munmap(area, memory);
+            qemu_ram_munmap(fd, area, memory);
             return NULL;
         }
     }
@@ -2394,7 +2394,7 @@ static void reclaim_ramblock(RAMBlock *block)
         xen_invalidate_map_cache_entry(block->host);
 #ifndef _WIN32
     } else if (block->fd >= 0) {
-        qemu_ram_munmap(block->host, block->max_length);
+        qemu_ram_munmap(block->fd, block->host, block->max_length);
         close(block->fd);
 #endif
     } else {
This page took 0.022837 seconds and 4 git commands to generate.