Re: [PATCH] scripts/tracepoint-update: fix memory leak in make_trace_array()
From: Steven Rostedt
Date: Wed Jan 21 2026 - 10:38:56 EST
On Wed, 21 Jan 2026 11:30:35 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> 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