From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Jonathan Cameron <jic23@kernel.org>,
linux-cxl@vger.kernel.org
Subject: [GIT PULL 14/23] hw/cxl: fix invalid free on early return
Date: Mon, 27 Jul 2026 15:51:23 +0400 [thread overview]
Message-ID: <20260727-fix-v1-14-ca3fa3851347@redhat.com> (raw)
In-Reply-To: <20260727-fix-v1-0-ca3fa3851347@redhat.com>
docs/devel/style.rst:
* Variables declared with g_auto* MUST always be initialized,
otherwise the cleanup function will use uninitialized stack memory
Fixes: 680935c9a6ff ("hw/cxl: Add a performant (and correct) path for the non interleaved cases")
Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
hw/cxl/cxl-host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/cxl/cxl-host.c b/hw/cxl/cxl-host.c
index 7e744312f1d8..eba13c9e7cba 100644
--- a/hw/cxl/cxl-host.c
+++ b/hw/cxl/cxl-host.c
@@ -279,7 +279,7 @@ static void cxl_fmws_direct_passthrough_setup(CXLDirectPTState *state,
MemoryRegion *mr = NULL;
uint64_t vmr_size = 0, pmr_size = 0, offset = 0;
MemoryRegion *direct_mr;
- g_autofree char *direct_mr_name;
+ g_autofree char *direct_mr_name = NULL;
unsigned int idx = state->hdm_decoder_idx;
if (ct3d->hostvmem) {
--
2.55.0
parent reply other threads:[~2026-07-27 11:52 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260727-fix-v1-0-ca3fa3851347@redhat.com>]
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=20260727-fix-v1-14-ca3fa3851347@redhat.com \
--to=marcandre.lureau@redhat.com \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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