]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix possible memory leak in __create_synth_event() error path
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 9 Dec 2021 02:43:17 +0000 (02:43 +0000)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 9 Dec 2021 18:03:05 +0000 (13:03 -0500)
commitc24be24aed405d64ebcf04526614c13b2adfb1d2
treee7e93e4376865ae7b91c59ed2e0cd25a431bb7b3
parente1067a07cfbc5a36abad3752fafe4c79e06db1bb
tracing: Fix possible memory leak in __create_synth_event() error path

There's error paths in __create_synth_event() after the argv is allocated
that fail to free it. Add a jump to free it when necessary.

Link: https://lkml.kernel.org/r/20211209024317.11783-1-linmq006@gmail.com
Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
[ Fixed up the patch and change log ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_synth.c