[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/15] hw/isa/vt82c686: Define a GPIO line between vt82c686 an
From: |
Akihiko Odaki |
Subject: |
[PATCH v2 04/15] hw/isa/vt82c686: Define a GPIO line between vt82c686 and i8259 |
Date: |
Thu, 27 Jun 2024 22:37:47 +0900 |
This fixes qemu_irq array leak.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
hw/isa/vt82c686.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index 8582ac0322eb..629d2d568137 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -715,13 +715,14 @@ static void via_isa_realize(PCIDevice *d, Error **errp)
ViaISAState *s = VIA_ISA(d);
DeviceState *dev = DEVICE(d);
PCIBus *pci_bus = pci_get_bus(d);
- qemu_irq *isa_irq;
+ qemu_irq isa_irq;
ISABus *isa_bus;
int i;
qdev_init_gpio_out(dev, &s->cpu_intr, 1);
qdev_init_gpio_in_named(dev, via_isa_pirq, "pirq", PCI_NUM_PINS);
- isa_irq = qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1);
+ qdev_init_gpio_in_named(dev, via_isa_request_i8259_irq, "i8259", 1);
+ isa_irq = qdev_get_gpio_in_named(dev, "i8259", 0);
isa_bus = isa_bus_new(dev, pci_address_space(d), pci_address_space_io(d),
errp);
@@ -729,7 +730,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp)
return;
}
- s->isa_irqs_in = i8259_init(isa_bus, *isa_irq);
+ s->isa_irqs_in = i8259_init(isa_bus, isa_irq);
isa_bus_register_input_irqs(isa_bus, s->isa_irqs_in);
i8254_pit_init(isa_bus, 0x40, 0, NULL);
i8257_dma_init(OBJECT(d), isa_bus, 0);
--
2.45.2
- [PATCH v2 00/15] Fix check-qtest-ppc64 sanitizer errors, Akihiko Odaki, 2024/06/27
- [PATCH v2 05/15] spapr: Free stdout path, Akihiko Odaki, 2024/06/27
- [PATCH v2 06/15] ppc/vof: Fix unaligned FDT property access, Akihiko Odaki, 2024/06/27
- [PATCH v2 07/15] hw/virtio: Free vqs after vhost_dev_cleanup(), Akihiko Odaki, 2024/06/27
- [PATCH v2 08/15] migration: Free removed SaveStateEntry, Akihiko Odaki, 2024/06/27