aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2019-10-01 15:36:21 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-10-04 18:49:16 +0200
commitf5f72e8f31f22ba5ee43db5cb9481206fc661f76 (patch)
treee846bc365970aa785830a26b521cb39696815927 /hw/ide
parentc0ff379514347b1656c366ff2e878c041048231b (diff)
downloadqemu-f5f72e8f31f22ba5ee43db5cb9481206fc661f76.zip
qemu-f5f72e8f31f22ba5ee43db5cb9481206fc661f76.tar.gz
qemu-f5f72e8f31f22ba5ee43db5cb9481206fc661f76.tar.bz2
ide: fix leak from qemu_allocate_irqs
The array returned by qemu_allocate_irqs is malloced, free it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/cmd646.c1
1 files changed, 1 insertions, 0 deletions
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);