From: "Alex Bennée" <alex.bennee@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, minhquangbui99@gmail.com
Subject: Re: [PATCH] hw/intc/apic: fix memory leak
Date: Tue, 05 Mar 2024 13:21:09 +0000 [thread overview]
Message-ID: <878r2wx1a2.fsf@draig.linaro.org> (raw)
In-Reply-To: <20240304224133.267640-1-pbonzini@redhat.com> (Paolo Bonzini's message of "Mon, 4 Mar 2024 23:41:33 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> 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>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2024-03-05 13:22 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 [this message]
2024-03-08 8:15 ` Philippe Mathieu-Daudé
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=878r2wx1a2.fsf@draig.linaro.org \
--to=alex.bennee@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.