Commit abab9d37 authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Ingo Molnar

trace_kprobes: Fix memory leak

tp->nr_args is not set before we "goto error",
it causes memory leak for free_trace_probe() use tp->nr_args
to free memory of args.
Signed-off-by: default avatarLai Jiangshan <>
Acked-by: default avatarMasami Hiramatsu <>
Cc: Steven Rostedt <>
Cc: Frederic Weisbecker <>
LKML-Reference: <>
Signed-off-by: default avatarIngo Molnar <>
parent 0f1ef51d
......@@ -704,10 +704,12 @@ static int create_trace_probe(int argc, char **argv)
ret = parse_probe_arg(arg, &tp->args[i].fetch, is_return);
if (ret) {
pr_info("Parse error at argument%d. (%d)\n", i, ret);
goto error;
tp->nr_args = i;
ret = register_trace_probe(tp);
if (ret)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment