diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-11-13 17:29:22 +0900 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-11-13 23:06:31 +0900 |
| commit | c15120853eebbda98f3fe1f1e59370439c6c4447 (patch) | |
| tree | dfecb9cede47ba1bf80b4b7875e48fe79c279c5b /tools/perf/scripts/python/bin | |
| parent | 0941144ebeaf3ce46c80711f00e935921eb28b21 (diff) | |
tracing/uprobes: Fix memory leak of tail in __trace_uprobe_create()
When generating a default event name in __trace_uprobe_create(), tail is
allocated with kstrdup() without __free(kfree). If the subsequent
kmalloc() for buf fails, the function returns -ENOMEM immediately and
leaks tail.
Declare tail with __free(kfree) so it is automatically freed on all
exit paths.
Link: https://lore.kernel.org/all/179455856197.403392.16569431894958507645.stgit@devnote2/
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/sashiko-outbox-204240@kernel.org/
Fixes: 97e8230f89a3 ("tracing: uprobe-event: Allocate string buffers from heap")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
