hw/intc/apic: fix memory leak