mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
e5d490b252
commit
d8cc1ab793
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue