diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2025-09-25 09:56:47 +0900 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2025-11-01 01:10:28 +0900 |
| commit | f959ecdfcb6b1c4d01f380c35ed0c0d99fc1ced9 (patch) | |
| tree | 36ac46f31f14fb1aff6101d89e98a70f929c9ada /kernel/trace/trace_eprobe.c | |
| parent | 0de4c70d04a46a3c266547dd4275ce25f623796a (diff) | |
tracing: probes: Use __free() for trace_probe_log
Use __free() for trace_probe_log_clear() to cleanup error log interface.
Link: https://lore.kernel.org/all/175509538609.193596.16646724647358218778.stgit@devnote2/
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'kernel/trace/trace_eprobe.c')
| -rw-r--r-- | kernel/trace/trace_eprobe.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c index a1d402124836..aaba765d54cf 100644 --- a/kernel/trace/trace_eprobe.c +++ b/kernel/trace/trace_eprobe.c @@ -874,6 +874,7 @@ static int __trace_eprobe_create(int argc, const char *argv[]) * Fetch args (no space): * <name>=$<field>[:TYPE] */ + const char *trlog __free(trace_probe_log_clear) = NULL; const char *event = NULL, *group = EPROBE_EVENT_SYSTEM; const char *sys_event = NULL, *sys_name = NULL; struct trace_event_call *event_call; @@ -887,7 +888,7 @@ static int __trace_eprobe_create(int argc, const char *argv[]) if (argc < 2 || argv[0][0] != 'e') return -ECANCELED; - trace_probe_log_init("event_probe", argc, argv); + trlog = trace_probe_log_init("event_probe", argc, argv); event = strchr(&argv[0][1], ':'); if (event) { @@ -987,7 +988,6 @@ static int __trace_eprobe_create(int argc, const char *argv[]) goto error; } } - trace_probe_log_clear(); return ret; mem_error: @@ -996,7 +996,6 @@ mem_error: parse_error: ret = -EINVAL; error: - trace_probe_log_clear(); trace_event_probe_cleanup(ep); return ret; } |