aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-disk.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 16:41:06 -0600
commitf8a83245d9ec685bc6aa6173d6765fe03e20688f (patch)
treeec0519bd357c16c937ac367dd0111d6f5f9b9d09 /hw/scsi-disk.c
parenta35aed57bf47584b5f55b71acf8daba19decf12a (diff)
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>
Diffstat (limited to 'hw/scsi-disk.c')
-rw-r--r--hw/scsi-disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index e3924dec9d..b34fbaa674 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -81,7 +81,7 @@ static SCSIDiskReq *scsi_new_request(SCSIDevice *d, uint32_t tag, uint32_t lun)
static void scsi_remove_request(SCSIDiskReq *r)
{
- qemu_free(r->iov.iov_base);
+ qemu_vfree(r->iov.iov_base);
scsi_req_free(&r->req);
}