diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 22:09:37 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-20 23:01:08 -0500 |
commit | 7267c0947d7e8ae5dff7bafd932c3bc285f43e5c (patch) | |
tree | 9aa05d6e05ed83e67bf014f6745a3081b8407dc5 /hw/openpic.c | |
parent | 14015304b662e8f8ccce46c5a6927af6a14c510b (diff) |
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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; } |