From a1a86bf902f4359d1556fb37a5443024b42898f4 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 (cherry picked from commit f8a83245d9ec685bc6aa6173d6765fe03e20688f) --- qemu-nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qemu-nbd.c') diff --git a/qemu-nbd.c b/qemu-nbd.c index 6cdb83473f..4ea8c9e45c 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -467,7 +467,7 @@ int main(int argc, char **argv) } } } while (persistent || nb_fds > 1); - qemu_free(data); + qemu_vfree(data); close(sharing_fds[0]); bdrv_close(bs); -- cgit v1.2.3