diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-07-23 03:28:40 (GMT) |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-07-23 13:52:09 (GMT) |
commit | d8cc1ab793993c886c62abf77c93287df33ffd8b (patch) | |
tree | 1e941a2832791b69ab9870c9ad9e9e844af50e1c /kernel | |
parent | e5d490b252423605a77c54b2e35b10ea663763df (diff) | |
download | linux-fsl-qoriq-d8cc1ab793993c886c62abf77c93287df33ffd8b.tar.xz |
trace_stack: Fix seqfile memory leak
Every time we cat stack_trace, we leak memory allocated by seq_open().
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <4A67D8E8.3020500@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace_stack.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index e644af9..6a2a9d4 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -301,17 +301,14 @@ static const struct seq_operations stack_trace_seq_ops = { static int stack_trace_open(struct inode *inode, struct file *file) { - int ret; - - ret = seq_open(file, &stack_trace_seq_ops); - - return ret; + return seq_open(file, &stack_trace_seq_ops); } static const struct file_operations stack_trace_fops = { .open = stack_trace_open, .read = seq_read, .llseek = seq_lseek, + .release = seq_release, }; int |