diff options
author | Andreas Färber <afaerber@suse.de> | 2014-06-18 00:55:18 -0700 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-06-30 21:13:30 +0200 |
commit | f3c7d0389fe8a2792fd4c1cf151b885de03c8f62 (patch) | |
tree | 17a37a957d51c956c3c9e98b8e4cdd6ac1adf3dd /hw/pcmcia/pxa2xx.c | |
parent | 127a4e1a51c038ec9167083b65d376dddcc64530 (diff) | |
download | qemu-f3c7d0389fe8a2792fd4c1cf151b885de03c8f62.tar.gz qemu-f3c7d0389fe8a2792fd4c1cf151b885de03c8f62.tar.bz2 qemu-f3c7d0389fe8a2792fd4c1cf151b885de03c8f62.zip |
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/pcmcia/pxa2xx.c')
-rw-r--r-- | hw/pcmcia/pxa2xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pcmcia/pxa2xx.c b/hw/pcmcia/pxa2xx.c index 96f377453d..55e8a2a62e 100644 --- a/hw/pcmcia/pxa2xx.c +++ b/hw/pcmcia/pxa2xx.c @@ -195,7 +195,7 @@ static void pxa2xx_pcmcia_initfn(Object *obj) memory_region_add_subregion(&s->container_mem, 0x0c000000, &s->common_iomem); - s->slot.irq = qemu_allocate_irqs(pxa2xx_pcmcia_set_irq, s, 1)[0]; + s->slot.irq = qemu_allocate_irq(pxa2xx_pcmcia_set_irq, s, 0); object_property_add_link(obj, "card", TYPE_PCMCIA_CARD, (Object **)&s->card, |