From 0e97ba6848428c7719e2bd3df724728e4e5265c5 Mon Sep 17 00:00:00 2001 From: Herve Poussineau Date: Sun, 24 Jan 2010 21:23:56 +0000 Subject: 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 Signed-off-by: Anthony Liguori --- exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exec.c') diff --git a/exec.c b/exec.c index 1190591e93..76831a194f 100644 --- a/exec.c +++ b/exec.c @@ -3309,7 +3309,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(); } -- cgit v1.2.3