[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/4] win32-aio: Fix how win32_aio_process_comple
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 3/4] win32-aio: Fix how win32_aio_process_completion() frees buffer |
Date: |
Tue, 15 Jan 2013 14:49:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
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 <address@hidden>
> ---
> 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
- [Qemu-devel] [PATCH 0/4] Fixes around qemu_vfree(), Markus Armbruster, 2013/01/15
- [Qemu-devel] [PATCH 3/4] win32-aio: Fix how win32_aio_process_completion() frees buffer, Markus Armbruster, 2013/01/15
- Re: [Qemu-devel] [PATCH 3/4] win32-aio: Fix how win32_aio_process_completion() frees buffer,
Kevin Wolf <=
- [Qemu-devel] [PATCH 2/4] scsi-disk: qemu_vfree(NULL) is fine, simplify, Markus Armbruster, 2013/01/15
- Re: [Qemu-devel] [PATCH 0/4] Fixes around qemu_vfree(), Kevin Wolf, 2013/01/15
- Re: [Qemu-devel] [PATCH 0/4] Fixes around qemu_vfree(), Stefan Hajnoczi, 2013/01/15