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:
Kevin Wolf 2013-01-16 21:20:00 +01:00 committed by Stefan Hajnoczi
parent bcbbd234d4
commit e8bccad5ac

View File

@ -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);
}