aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/z2.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2014-06-18 00:55:18 -0700
committerAndreas Färber <afaerber@suse.de>2014-06-30 21:13:30 +0200
commitf3c7d0389fe8a2792fd4c1cf151b885de03c8f62 (patch)
tree17a37a957d51c956c3c9e98b8e4cdd6ac1adf3dd /hw/arm/z2.c
parent127a4e1a51c038ec9167083b65d376dddcc64530 (diff)
hw: Fix qemu_allocate_irqs() leaks
Replace qemu_allocate_irqs(foo, bar, 1)[0] with qemu_allocate_irq(foo, bar, 0). This avoids leaking the dereferenced qemu_irq *. Cc: Markus Armbruster <armbru@redhat.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de> [PC Changes: * Applied change to instance in sh4/sh7750.c ] Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Kirill Batuzov <batuzovk@ispras.ru> [AF: Fix IRQ index in sh4/sh7750.c] Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/arm/z2.c')
-rw-r--r--hw/arm/z2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
index ab9e4c9e79..36b3b504f4 100644
--- a/hw/arm/z2.c
+++ b/hw/arm/z2.c
@@ -363,7 +363,7 @@ static void z2_init(MachineState *machine)
wm8750_data_req_set(wm, mpu->i2s->data_req, mpu->i2s);
qdev_connect_gpio_out(mpu->gpio, Z2_GPIO_LCD_CS,
- qemu_allocate_irqs(z2_lcd_cs, z2_lcd, 1)[0]);
+ qemu_allocate_irq(z2_lcd_cs, z2_lcd, 0));
z2_binfo.kernel_filename = kernel_filename;
z2_binfo.kernel_cmdline = kernel_cmdline;