提交 45dabf14 编写于 作者: L Li Zefan 提交者: Paul Mundt

sh: fix seq_file memory leak

When using single_open(), single_release() should be used instead
of seq_release(), otherwise there is a memory leak.
Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 c9272c4f
...@@ -120,7 +120,7 @@ static const struct file_operations cache_debugfs_fops = { ...@@ -120,7 +120,7 @@ static const struct file_operations cache_debugfs_fops = {
.open = cache_debugfs_open, .open = cache_debugfs_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = single_release,
}; };
static int __init cache_debugfs_init(void) static int __init cache_debugfs_init(void)
......
...@@ -385,7 +385,7 @@ static const struct file_operations pmb_debugfs_fops = { ...@@ -385,7 +385,7 @@ static const struct file_operations pmb_debugfs_fops = {
.open = pmb_debugfs_open, .open = pmb_debugfs_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = single_release,
}; };
static int __init pmb_debugfs_init(void) static int __init pmb_debugfs_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册