sh: fix seq_file memory leak
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 24 Jun 2008 05:30:23 +0000 (13:30 +0800)
committerPaul Mundt <lethal@linux-sh.org>
Mon, 28 Jul 2008 09:10:27 +0000 (18:10 +0900)
When using single_open(), single_release() should be used instead
of seq_release(), otherwise there is a memory leak.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/mm/cache-debugfs.c
arch/sh/mm/pmb.c

index c5b56d5..0e189cc 100644 (file)
@@ -120,7 +120,7 @@ static const struct file_operations cache_debugfs_fops = {
        .open           = cache_debugfs_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
-       .release        = seq_release,
+       .release        = single_release,
 };
 
 static int __init cache_debugfs_init(void)
index 46911bc..cef7276 100644 (file)
@@ -385,7 +385,7 @@ static const struct file_operations pmb_debugfs_fops = {
        .open           = pmb_debugfs_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
-       .release        = seq_release,
+       .release        = single_release,
 };
 
 static int __init pmb_debugfs_init(void)