From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: minhquangbui99@gmail.com
Subject: Re: [PATCH] hw/intc/apic: fix memory leak
Date: Fri, 8 Mar 2024 09:15:04 +0100 [thread overview]
Message-ID: <48f316f0-f16a-43b6-af81-215fa5a127b6@linaro.org> (raw)
In-Reply-To: <20240304224133.267640-1-pbonzini@redhat.com>
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.
prev parent reply other threads:[~2024-03-08 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 22:41 [PATCH] hw/intc/apic: fix memory leak Paolo Bonzini
2024-03-05 9:09 ` Philippe Mathieu-Daudé
2024-03-05 9:12 ` Bui Quang Minh
2024-03-05 13:21 ` Alex Bennée
2024-03-08 8:15 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48f316f0-f16a-43b6-af81-215fa5a127b6@linaro.org \
--to=philmd@linaro.org \
--cc=minhquangbui99@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).