Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-24 Thread John Snow
On 3/24/20 4:43 PM, Mark Cave-Ayland wrote: > On 23/03/2020 15:17, Peter Maydell wrote: > >> Coverity points out (CID 1421984) that we are leaking the >> memory returned by qemu_allocate_irqs(). We can avoid this >> leak by switching to using qdev_init_gpio_in(); the base >> class finalize

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-24 Thread Mark Cave-Ayland
On 23/03/2020 15:17, Peter Maydell wrote: > Coverity points out (CID 1421984) that we are leaking the > memory returned by qemu_allocate_irqs(). We can avoid this > leak by switching to using qdev_init_gpio_in(); the base > class finalize will free the irqs that this allocates under > the hood. >

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, John Snow wrote: On 3/23/20 1:04 PM, BALATON Zoltan wrote: On Mon, 23 Mar 2020, Peter Maydell wrote: Coverity points out (CID 1421984) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread John Snow
On 3/23/20 1:04 PM, BALATON Zoltan wrote: > On Mon, 23 Mar 2020, Peter Maydell wrote: >> Coverity points out (CID 1421984) that we are leaking the >> memory returned by qemu_allocate_irqs(). We can avoid this >> leak by switching to using qdev_init_gpio_in(); the base >> class finalize will

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 17:04, BALATON Zoltan wrote: > > On Mon, 23 Mar 2020, Peter Maydell wrote: > > Coverity points out (CID 1421984) that we are leaking the > > memory returned by qemu_allocate_irqs(). We can avoid this > > leak by switching to using qdev_init_gpio_in(); the base > > class

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, Peter Maydell wrote: Coverity points out (CID 1421984) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood.

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 4:17 PM, Peter Maydell wrote: Coverity points out (CID 1421984) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood.

[PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread Peter Maydell
Coverity points out (CID 1421984) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood. Signed-off-by: Peter Maydell --- This is how the