From: Andrew Cooper Date: Tue, 21 Apr 2015 13:36:08 +0000 (+0100) Subject: pic: Don't allocate irq buffers X-Git-Tag: xen-4.6.1~22 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c36a4e522bfa615f38fbf71d7da483fefc8900f2;p=qemu-xen-traditional.git pic: Don't allocate irq buffers i8259_init() doesn't inspect its argument at all, causing the allocation to be leaked and never used. Signed-off-by: Andrew Cooper --- diff --git a/hw/pc.c b/hw/pc.c index 73593381..09b4af47 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -801,7 +801,6 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size, PCIBus *pci_bus; int piix3_devfn = -1; CPUState *env; - qemu_irq *cpu_irq; qemu_irq *i8259; int index; BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; @@ -970,8 +969,7 @@ vga_bios_error: bochs_bios_init(); - cpu_irq = qemu_allocate_irqs(pic_irq_request, NULL, 1); - i8259 = i8259_init(cpu_irq[0]); + i8259 = i8259_init(NULL); ferr_irq = i8259[13]; if (pci_enabled) {