summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2009-09-22 13:54:28 +0800
committerIngo Molnar <mingo@elte.hu>2009-09-22 10:28:57 +0200
commit79fe249c8368be35c9ca05982e80c68e959505e1 (patch)
treecfb0b12a3d189fde435db4cab817b740c14517f3 /kernel/trace
parent1eb90f138b3fb4cc15f3acec94aa788e846269f7 (diff)
downloadop-kernel-dev-79fe249c8368be35c9ca05982e80c68e959505e1.zip
op-kernel-dev-79fe249c8368be35c9ca05982e80c68e959505e1.tar.gz
tracing: Fix failure path in ftrace_regex_open()
Don't forget to free trace_parser if seq_open() returned failure. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4AB86694.4040803@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ftrace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 5c5cb9b..e70af98 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1621,8 +1621,10 @@ ftrace_regex_open(struct inode *inode, struct file *file, int enable)
if (!ret) {
struct seq_file *m = file->private_data;
m->private = iter;
- } else
+ } else {
+ trace_parser_put(&iter->parser);
kfree(iter);
+ }
} else
file->private_data = iter;
mutex_unlock(&ftrace_regex_lock);
OpenPOWER on IntegriCloud