qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/intc/apic: fix memory leak


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] hw/intc/apic: fix memory leak
Date: Fri, 8 Mar 2024 09:15:04 +0100
User-agent: Mozilla Thunderbird

On 4/3/24 23:41, Paolo Bonzini wrote:
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)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  hw/intc/apic.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

Thanks, patch queued.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]