aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-03-04 23:39:02 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-03-08 15:51:22 +0100
commitafd1af1c9964335b1482693edbdd4b564c42e269 (patch)
tree64e4620d9a83ec46f17203bd7bde100fcd60f3ac /util
parenta9198b3132d81a6bfc9fdbf6f3d3a514c2864674 (diff)
downloadqemu-afd1af1c9964335b1482693edbdd4b564c42e269.zip
qemu-afd1af1c9964335b1482693edbdd4b564c42e269.tar.gz
qemu-afd1af1c9964335b1482693edbdd4b564c42e269.tar.bz2
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 'util')
0 files changed, 0 insertions, 0 deletions