[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Coverity CID 1421984
From: |
Peter Maydell |
Subject: |
Re: Coverity CID 1421984 |
Date: |
Mon, 23 Mar 2020 14:35:12 +0000 |
On Mon, 23 Mar 2020 at 14:06, BALATON Zoltan <address@hidden> wrote:
> On Mon, 23 Mar 2020, Peter Maydell wrote:
> > Coverity has flagged up a lot of leaks involving qemu_allocate_irqs();
> > most of them I've for the moment just set as "insignificant, fix
> > required" because they're in called-once functions like board init.
> > If this device can't be hot-unplugged and so we will only ever call
> > realize once, it would fall in that category too. Otherwise I'd
> > suggest conversion to qdev_init_gpio_in(). (This allocates arrays
> > of IRQs under the hood too, but the device_finalize() function will
> > automatically free them for you, so it's easier to use non-leakily.)
>
> I think I can't do that in sii3112 becuase I need to pass irq to this func:
>
> void ide_init2(IDEBus *bus, qemu_irq irq);
ide_init2(bus, qdev_get_gpio_in(DEVICE(dev), i);
should do what you want, I think.
thanks
-- PMM
- Re: Coverity CID 1421984, Philippe Mathieu-Daudé, 2020/03/23
- Re: Coverity CID 1421984, BALATON Zoltan, 2020/03/23
- Re: Coverity CID 1421984, Max Reitz, 2020/03/23
- Re: Coverity CID 1421984, Peter Maydell, 2020/03/23
- Re: Coverity CID 1421984, BALATON Zoltan, 2020/03/23
- Re: Coverity CID 1421984,
Peter Maydell <=
- Re: Coverity CID 1421984, BALATON Zoltan, 2020/03/23
- Re: Coverity CID 1421984, Peter Maydell, 2020/03/23
- Re: Coverity CID 1421984, BALATON Zoltan, 2020/03/23
- Re: Coverity CID 1421984, Peter Maydell, 2020/03/23
- Re: Coverity CID 1421984, Philippe Mathieu-Daudé, 2020/03/23