aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-01-16 21:20:00 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-01-17 10:58:09 +0100
commite8bccad5ac6095b5af7946cd72d9aacb57f7c0a3 (patch)
tree7bd3f447e92d76f0ebbe7d5cea70aac2e7191628 /block
parentbcbbd234d42f1111e42b91376db61922d42e7e9e (diff)
downloadqemu-e8bccad5ac6095b5af7946cd72d9aacb57f7c0a3.zip
qemu-e8bccad5ac6095b5af7946cd72d9aacb57f7c0a3.tar.gz
qemu-e8bccad5ac6095b5af7946cd72d9aacb57f7c0a3.tar.bz2
win32-aio: Fix memory leak
The buffer is allocated for both reads and writes, and obviously it should be freed even if an error occurs. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/win32-aio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/win32-aio.c b/block/win32-aio.c
index e4b7b75..b9236ea 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -87,8 +87,8 @@ static void win32_aio_process_completion(QEMUWin32AIOState *s,
memcpy(qiov->iov[i].iov_base, p, qiov->iov[i].iov_len);
p += qiov->iov[i].iov_len;
}
- qemu_vfree(waiocb->buf);
}
+ qemu_vfree(waiocb->buf);
}