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>
This commit is contained in:
parent
bcbbd234d4
commit
e8bccad5ac
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user