On 01/10/2019 15.36, Paolo Bonzini wrote: > The array returned by qemu_allocate_irqs is malloced, free it. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > hw/ide/cmd646.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c > index f3ccd11..19984d2 100644 > --- a/hw/ide/cmd646.c > +++ b/hw/ide/cmd646.c > @@ -300,6 +300,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error > **errp) > d->bmdma[i].bus = &d->bus[i]; > ide_register_restart_cb(&d->bus[i]); > } > + g_free(irq); > > vmstate_register(DEVICE(dev), 0, &vmstate_ide_pci, d); > qemu_register_reset(cmd646_reset, d); >
Maybe you could also update the description of qemu_allocate_irqs() to state that the returned pointer should be g_free'd later? Reviewed-by: Thomas Huth <th...@redhat.com>