提交 8db403b9 编写于 作者: C Christophe JAILLET 提交者: Steven Rostedt (VMware)

tracing/dynevent: Fix a memory leak in an error handling path

We must free 'argv' before returning, as already done in all the other
paths of this function.

Link: https://lkml.kernel.org/r/21e3594ccd7fc88c5c162c98450409190f304327.1618136448.git.christophe.jaillet@wanadoo.fr

Fixes: d262271d ("tracing/dynevent: Delegate parsing to create function")
Acked-by: NMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 9deb193a
......@@ -63,8 +63,10 @@ int dyn_event_release(const char *raw_command, struct dyn_event_operations *type
event = p + 1;
*p = '\0';
}
if (event[0] == '\0')
return -EINVAL;
if (event[0] == '\0') {
ret = -EINVAL;
goto out;
}
mutex_lock(&event_mutex);
for_each_dyn_event_safe(pos, n) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册