[Qemu-devel] [PATCH 84/88] hw/scsi: use g_new() family of functions

Philippe Mathieu-Daudé posted 88 patches 8 years, 4 months ago
[Qemu-devel] [PATCH 84/88] hw/scsi: use g_new() family of functions
Posted by Philippe Mathieu-Daudé 8 years, 4 months ago
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/scsi/vmw_pvscsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index d8079158ac..24d0306ede 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -616,7 +616,7 @@ pvscsi_queue_pending_descriptor(PVSCSIState *s, SCSIDevice **d,
     PVSCSIRequest *pvscsi_req;
     uint8_t lun;
 
-    pvscsi_req = g_malloc0(sizeof(*pvscsi_req));
+    pvscsi_req = g_new0(PVSCSIRequest, 1);
     pvscsi_req->dev = s;
     pvscsi_req->req = *descr;
     pvscsi_req->cmp.context = pvscsi_req->req.context;
-- 
2.14.2