Files
qemu/hw
Paolo Bonzini 0fad90955e hw/intc/apic: fix memory leak
deliver_bitmask is allocated on the heap in apic_deliver(), but there
are many paths in the function that return before the corresponding
g_free() is reached.  Fix this by switching to g_autofree and, while at
it, also switch to g_new.  Do the same in apic_deliver_irq() as well
for consistency.

Fixes: b5ee0468e9 ("apic: add support for x2APIC mode", 2024-02-14)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bui Quang Minh <minhquangbui99@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-ID: <20240304224133.267640-1-pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-03-09 18:51:45 +01:00
..
2023-12-29 11:17:30 +11:00
2024-03-07 12:19:25 +00:00
2024-02-27 09:37:13 +01:00
2024-03-09 18:51:45 +01:00
2023-12-29 11:17:30 +11:00
2023-12-29 11:17:30 +11:00
2024-03-08 21:00:37 +10:00
2024-02-13 19:37:28 +00:00
2023-12-30 07:38:06 +11:00
2023-12-30 07:38:06 +11:00
2024-02-28 11:31:28 +08:00
2023-12-30 07:38:06 +11:00
2024-02-01 08:13:30 +01:00
2024-02-01 08:13:30 +01:00