aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-07-11 22:46:05 +0100
committerPaul Brook <paul@codesourcery.com>2009-07-11 22:46:51 +0100
commit616cbc78a50c638b94cc4756a565f11bb10dbfeb (patch)
treecc6c0c930b816344a29df080c5554a25fcc7362a /hw/pci.c
parent110c50fd3147f749373926400ed583504f351fd1 (diff)
Fix PCI IRQ breakage
Zero initialize the PCI bus irq count. Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pci.c b/hw/pci.c
index f592925d06..a6fb957b27 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -123,7 +123,7 @@ PCIBus *pci_register_bus(DeviceState *parent, const char *name,
bus->irq_opaque = pic;
bus->devfn_min = devfn_min;
bus->nirq = nirq;
- bus->irq_count = qemu_malloc(nirq * sizeof(bus->irq_count[0]));
+ bus->irq_count = qemu_mallocz(nirq * sizeof(bus->irq_count[0]));
bus->next = first_bus;
first_bus = bus;
register_savevm("PCIBUS", nbus++, 1, pcibus_save, pcibus_load, bus);