From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Weigang He <geoffreyhe2@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
Tuo Li <islituo@gmail.com>
Subject: Re: [PATCH] scripts/tracepoint-update: fix memory leak in make_trace_array()
Date: Wed, 21 Jan 2026 09:41:32 -0500 [thread overview]
Message-ID: <20260121094132.1e9abbdb@gandalf.local.home> (raw)
In-Reply-To: <20260121113035.20f1f464c5f416998d577784@kernel.org>
On Wed, 21 Jan 2026 11:30:35 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> > It would make much more sense to have add_string() free vals, and set
> > vals to NULL on error.
>
> I think it should be failed if it fails to add string. Can it
> continue checking tracepoints even after the error?
This patch is simply fixing a memory leak on failure (which isn't really a
big deal since this is just a user space tool that runs for a short time
during build). Returning a failure here is out of scope of this patch.
Feel free to send an RFC patch that returns a failure built on top of this
patch, and we can discuss if that should be done or not for that change.
-- Steve
prev parent reply other threads:[~2026-01-21 14:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 13:02 [PATCH] scripts/tracepoint-update: fix memory leak in make_trace_array() Weigang He
2026-01-18 15:54 ` Steven Rostedt
2026-01-21 2:30 ` Masami Hiramatsu
2026-01-21 14:41 ` Steven Rostedt [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=20260121094132.1e9abbdb@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=geoffreyhe2@gmail.com \
--cc=islituo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.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