Commit 616cbc78a50c638b94cc4756a565f11bb10dbfeb
1 parent
110c50fd
Fix PCI IRQ breakage
Zero initialize the PCI bus irq count. Signed-off-by: Paul Brook <paul@codesourcery.com>
Showing
1 changed file
with
1 additions
and
1 deletions
hw/pci.c
| @@ -123,7 +123,7 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name, | @@ -123,7 +123,7 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name, | ||
| 123 | bus->irq_opaque = pic; | 123 | bus->irq_opaque = pic; |
| 124 | bus->devfn_min = devfn_min; | 124 | bus->devfn_min = devfn_min; |
| 125 | bus->nirq = nirq; | 125 | bus->nirq = nirq; |
| 126 | - bus->irq_count = qemu_malloc(nirq * sizeof(bus->irq_count[0])); | 126 | + bus->irq_count = qemu_mallocz(nirq * sizeof(bus->irq_count[0])); |
| 127 | bus->next = first_bus; | 127 | bus->next = first_bus; |
| 128 | first_bus = bus; | 128 | first_bus = bus; |
| 129 | register_savevm("PCIBUS", nbus++, 1, pcibus_save, pcibus_load, bus); | 129 | register_savevm("PCIBUS", nbus++, 1, pcibus_save, pcibus_load, bus); |