diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-05 18:56:50 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-05-05 18:56:50 +0200 |
commit | 2c17a1cd90a5d385a7138c030e815e3effc45677 (patch) | |
tree | 11e13ab22578e6218a8b60d5d9d74e0f408dc638 /kernel | |
parent | Merge tag 'trace-v6.9-rc6-2' of git://git.kernel.org/pub/scm/linux/kernel/git... (diff) | |
parent | tracing/probes: Fix memory leak in traceprobe_parse_probe_arg_body() (diff) | |
download | linux-2c17a1cd90a5d385a7138c030e815e3effc45677.tar.xz linux-2c17a1cd90a5d385a7138c030e815e3effc45677.zip |
Merge tag 'probes-fixes-v6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull probes fix from Masami Hiramatsu:
- probe-events: Fix memory leak in parsing probe argument.
There is a memory leak (forget to free an allocated buffer) in a
memory allocation failure path. Fix it to jump to the correct error
handling code.
* tag 'probes-fixes-v6.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
tracing/probes: Fix memory leak in traceprobe_parse_probe_arg_body()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_probe.c b/kernel/trace/trace_probe.c index dfe3ee6035ec..42bc0f362226 100644 --- a/kernel/trace/trace_probe.c +++ b/kernel/trace/trace_probe.c @@ -1466,7 +1466,7 @@ static int traceprobe_parse_probe_arg_body(const char *argv, ssize_t *size, parg->fmt = kmalloc(len, GFP_KERNEL); if (!parg->fmt) { ret = -ENOMEM; - goto out; + goto fail; } snprintf(parg->fmt, len, "%s[%d]", parg->type->fmttype, parg->count); |