Revision 7267c094 hw/openpic.c

b/hw/openpic.c
1180 1180
        pci_register_bar(&opp->pci_dev, 0,
1181 1181
                         PCI_BASE_ADDRESS_SPACE_MEMORY, &opp->mem);
1182 1182
    } else {
1183
        opp = qemu_mallocz(sizeof(openpic_t));
1183
        opp = g_malloc0(sizeof(openpic_t));
1184 1184
        memory_region_init_io(&opp->mem, &openpic_ops, opp, "openpic", 0x40000);
1185 1185
    }
1186 1186

  
......
1644 1644
    if (nb_cpus != 1)
1645 1645
        return NULL;
1646 1646

  
1647
    mpp = qemu_mallocz(sizeof(openpic_t));
1647
    mpp = g_malloc0(sizeof(openpic_t));
1648 1648

  
1649 1649
    for (i = 0; i < sizeof(list)/sizeof(list[0]); i++) {
1650 1650
        int mem_index;
......
1676 1676
    return qemu_allocate_irqs(openpic_set_irq, mpp, mpp->max_irq);
1677 1677

  
1678 1678
free:
1679
    qemu_free(mpp);
1679
    g_free(mpp);
1680 1680
    return NULL;
1681 1681
}

Also available in: Unified diff