On Wed, May 21, 2014 at 06:28:05PM +0200, Kevin Wolf wrote:
> @@ -550,7 +553,11 @@ static BlockDriverAIOCB 
> *iscsi_aio_ioctl(BlockDriverState *bs,
>  #else
>              struct iovec *iov = (struct iovec *)acb->ioh->dxferp;
>  
> -            acb->buf = g_malloc(acb->ioh->dxfer_len);
> +            acb->buf = g_try_malloc(acb->ioh->dxfer_len);
> +            if (acb->buf == NULL) {
> +                qemu_aio_release(acb);
> +                return NULL;
> +            }

Leaks acb->task which happens to be malloc(3) allocated :(.

Reply via email to