diff options
Diffstat (limited to 'hw/openpic.c')
-rw-r--r-- | hw/openpic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/openpic.c b/hw/openpic.c index ccd4a14f81..26c96e20f9 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -1180,7 +1180,7 @@ qemu_irq *openpic_init (PCIBus *bus, MemoryRegion **pmem, int nb_cpus, pci_register_bar(&opp->pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &opp->mem); } else { - opp = qemu_mallocz(sizeof(openpic_t)); + opp = g_malloc0(sizeof(openpic_t)); memory_region_init_io(&opp->mem, &openpic_ops, opp, "openpic", 0x40000); } @@ -1644,7 +1644,7 @@ qemu_irq *mpic_init (target_phys_addr_t base, int nb_cpus, if (nb_cpus != 1) return NULL; - mpp = qemu_mallocz(sizeof(openpic_t)); + mpp = g_malloc0(sizeof(openpic_t)); for (i = 0; i < sizeof(list)/sizeof(list[0]); i++) { int mem_index; @@ -1676,6 +1676,6 @@ qemu_irq *mpic_init (target_phys_addr_t base, int nb_cpus, return qemu_allocate_irqs(openpic_set_irq, mpp, mpp->max_irq); free: - qemu_free(mpp); + g_free(mpp); return NULL; } |