diff --git a/hw/block/nvme.c b/hw/block/nvme.c index aa57749f43..8cd30430e9 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -668,7 +668,7 @@ static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n, uint64_t dma_addr, sq->size = size; sq->cqid = cqid; sq->head = sq->tail = 0; - sq->io_req = g_new(NvmeRequest, sq->size); + sq->io_req = g_new0(NvmeRequest, sq->size); QTAILQ_INIT(&sq->req_list); QTAILQ_INIT(&sq->out_req_list);