diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-03-04 23:39:02 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-03-08 15:51:22 +0100 |
commit | afd1af1c9964335b1482693edbdd4b564c42e269 (patch) | |
tree | 64e4620d9a83ec46f17203bd7bde100fcd60f3ac /hw/9pfs | |
parent | a9198b3132d81a6bfc9fdbf6f3d3a514c2864674 (diff) |
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: b5ee0468e9d ("apic: add support for x2APIC mode", 2024-02-14)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bui Quang Minh <minhquangbui99@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/9pfs')
0 files changed, 0 insertions, 0 deletions