From: Li Zefan Date: Tue, 22 Sep 2009 05:54:28 +0000 (+0800) Subject: tracing: Fix failure path in ftrace_regex_open() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=79fe249c8368be35c9ca05982e80c68e959505e1;p=mv-sheeva.git 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 Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Steven Rostedt LKML-Reference: <4AB86694.4040803@cn.fujitsu.com> Signed-off-by: Ingo Molnar --- diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 5c5cb9be8e8..e70af98bb99 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);