Skip to content

Commit

Permalink
Merge tag 'probes-fixes-v6.13-rc6' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/kernel/git/trace/linux-trace

Pull probes fix from Masami Hiramatsu:
 "Fix to free trace_kprobe objects at a failure path in
  __trace_kprobe_create() function. This fixes a memory leak"

* tag 'probes-fixes-v6.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  tracing/kprobes: Fix to free objects when failed to copy a symbol
  • Loading branch information
Linus Torvalds committed Jan 12, 2025
2 parents b62cef9 + 30c8fd3 commit a87d120
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kernel/trace/trace_kprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,10 @@ static int __trace_kprobe_create(int argc, const char *argv[])
}
/* a symbol specified */
symbol = kstrdup(argv[1], GFP_KERNEL);
if (!symbol)
return -ENOMEM;
if (!symbol) {
ret = -ENOMEM;
goto error;
}

tmp = strchr(symbol, '%');
if (tmp) {
Expand Down

0 comments on commit a87d120

Please sign in to comment.