On Fri, Jun 06, 2014 at 09:53:23AM +0800, Fam Zheng wrote: > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 49507ac..388741e 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -27,6 +27,22 @@ > #endif > #include "hw/virtio/virtio-bus.h" > > +static VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s) > +{ > + VirtIOBlockReq *req = g_malloc0(sizeof(*req));
The virtio-blk.c code used g_malloc() but since we're using g_slice_new0() for the VirtQueueElement, we might as well use the slice allocator here too.