summaryrefslogtreecommitdiffstats
path: root/hw/ide
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/ide
parent127a4e1a51c038ec9167083b65d376dddcc64530 (diff)
downloadhqemu-f3c7d0389fe8a2792fd4c1cf151b885de03c8f62.zip
hqemu-f3c7d0389fe8a2792fd4c1cf151b885de03c8f62.tar.gz
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/ide')
-rw-r--r--hw/ide/microdrive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c
index f24946d..2d70ddb 100644
--- a/hw/ide/microdrive.c
+++ b/hw/ide/microdrive.c
@@ -593,7 +593,7 @@ static void microdrive_realize(DeviceState *dev, Error **errp)
{
MicroDriveState *md = MICRODRIVE(dev);
- ide_init2(&md->bus, qemu_allocate_irqs(md_set_irq, md, 1)[0]);
+ ide_init2(&md->bus, qemu_allocate_irq(md_set_irq, md, 0));
}
static void microdrive_init(Object *obj)
OpenPOWER on IntegriCloud