On Fri, May 14, 2010 at 10:52:30PM +0100, Stefan Hajnoczi wrote: > diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c > index b05d15e..d270225 100644 > --- a/hw/virtio-blk.c > +++ b/hw/virtio-blk.c > @@ -105,8 +105,10 @@ static void virtio_blk_flush_complete(void *opaque, int > ret) > > static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s) > { > - VirtIOBlockReq *req = qemu_mallocz(sizeof(*req)); > + VirtIOBlockReq *req = qemu_malloc(sizeof(*req)); > req->dev = s; > + req->qiov.size = 0; > + req->next = NULL; > return req;
Looks good, but you shouldn't even need to initialize req->qiov.size, we do this later by calling qemu_iovec_init_external before using it.