aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorHerve Poussineau <hpoussin@reactos.org>2010-01-24 21:23:56 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-26 18:09:22 -0600
commita1a86bf902f4359d1556fb37a5443024b42898f4 (patch)
treedd755cc440c9eebebbed284badfe56d50365256e /exec.c
parentvnc_refresh: calling vnc_update_client might free vs (diff)
downloadqemu-kvm-a1a86bf902f4359d1556fb37a5443024b42898f4.tar.gz
qemu-kvm-a1a86bf902f4359d1556fb37a5443024b42898f4.tar.bz2
qemu-kvm-a1a86bf902f4359d1556fb37a5443024b42898f4.zip
win32: pair qemu_memalign() with qemu_vfree()
Win32 suffers from a very big memory leak when dealing with SCSI devices. Each read/write request allocates memory with qemu_memalign (ie VirtualAlloc) but frees it with qemu_free (ie free). Pair all qemu_memalign() calls with qemu_vfree() to prevent such leaks. Signed-off-by: Herve Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit f8a83245d9ec685bc6aa6173d6765fe03e20688f)
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 7b7fb5ba0..5969eb27c 100644
--- a/exec.c
+++ b/exec.c
@@ -3307,7 +3307,7 @@ void cpu_physical_memory_unmap(void *buffer, target_phys_addr_t len,
if (is_write) {
cpu_physical_memory_write(bounce.addr, bounce.buffer, access_len);
}
- qemu_free(bounce.buffer);
+ qemu_vfree(bounce.buffer);
bounce.buffer = NULL;
cpu_notify_map_clients();
}