diff mbox series

[85/88] hw/usb: use g_new() family of functions

Message ID 20171006235023.11952-86-f4bug@amsat.org
State New
Headers show
Series use g_new() family of functions | expand

Commit Message

Philippe Mathieu-Daudé Oct. 6, 2017, 11:50 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/usb/hcd-ehci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index 0134232627..34785923f3 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -545,7 +545,7 @@  static EHCIQueue *ehci_alloc_queue(EHCIState *ehci, uint32_t addr, int async)
     EHCIQueueHead *head = async ? &ehci->aqueues : &ehci->pqueues;
     EHCIQueue *q;
 
-    q = g_malloc0(sizeof(*q));
+    q = g_new0(EHCIQueue, 1);
     q->ehci = ehci;
     q->qhaddr = addr;
     q->async = async;