Files
linux/kernel
Masami Hiramatsu (Google) c15120853e 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 <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Fixes: 97e8230f89 ("tracing: uprobe-event: Allocate string buffers from heap")
Cc: [email protected]
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-13 23:06:31 +09:00
..
…
…
2026-09-28 08:44:41 +02:00
…
…
…
…
…
2026-11-11 12:32:07 +01:00
2026-10-12 11:13:01 +02:00
…
…
…
…
2026-10-24 00:46:49 -07:00
2026-01-26 19:07:13 -08:00
…
…
2026-09-04 12:46:45 +02:00