Am 15.01.2013 14:23, schrieb Markus Armbruster:
> win32_aio_submit() allocates it with qemu_blockalign(), therefore it
> must be freed with qemu_vfree(), not g_free().
> 
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  block/win32-aio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/win32-aio.c b/block/win32-aio.c
> index 46a5db7..0383370 100644
> --- a/block/win32-aio.c
> +++ b/block/win32-aio.c
> @@ -87,7 +87,7 @@ static void win32_aio_process_completion(QEMUWin32AIOState 
> *s,
>                  memcpy(p, qiov->iov[i].iov_base, qiov->iov[i].iov_len);
>                  p += qiov->iov[i].iov_len;
>              }
> -            g_free(waiocb->buf);
> +            qemu_vfree(waiocb->buf);
>          }
>      }

Independent bug: waiocb->buf is leaked for writes and failed reads.

Kevin

Reply via email to