OSDN Git Service

mcf5208: fix leak from qemu_allocate_irqs
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Oct 2019 13:36:23 +0000 (15:36 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 4 Oct 2019 16:49:16 +0000 (18:49 +0200)
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>
hw/m68k/mcf5208.c

index 012710d..60c5802 100644 (file)
@@ -273,6 +273,8 @@ static void mcf5208evb_init(MachineState *machine)
                      0xfc030000, pic + 36);
     }
 
+    g_free(pic);
+
     /*  0xfc000000 SCM.  */
     /*  0xfc004000 XBS.  */
     /*  0xfc008000 FlexBus CS.  */