Message ID | 1358367600-8074-3-git-send-email-kwolf@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/block/win32-aio.c b/block/win32-aio.c index 53b82e6..546a60d 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; } - g_free(waiocb->buf); } + g_free(waiocb->buf); }
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> --- block/win32-aio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)