This suppresses LeakSanitizer warnings.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
hw/ide/macio.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/ide/macio.c b/hw/ide/macio.c
index aca90d04f0e8..d8fbc1a17ba6 100644
--- a/hw/ide/macio.c
+++ b/hw/ide/macio.c
@@ -464,6 +464,14 @@ static void macio_ide_initfn(Object *obj)
qdev_prop_allow_set_link_before_realize, 0);
}
+static void macio_ide_finalize(Object *obj)
+{
+ MACIOIDEState *s = MACIO_IDE(obj);
+
+ qemu_free_irq(s->dma_irq);
+ qemu_free_irq(s->ide_irq);
+}
+
static Property macio_ide_properties[] = {
DEFINE_PROP_UINT32("channel", MACIOIDEState, channel, 0),
DEFINE_PROP_UINT32("addr", MACIOIDEState, addr, -1),
@@ -486,6 +494,7 @@ static const TypeInfo macio_ide_type_info = {
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(MACIOIDEState),
.instance_init = macio_ide_initfn,
+ .instance_finalize = macio_ide_finalize,
.class_init = macio_ide_class_init,
};