]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
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 c5b56d52b7d27cf7d87a6bd3e2d1e99b24f97bf2..0e189ccd4a77a7ce7462f9eb863409d419a71150 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 46911bcbf17b01e53e92915c63a84db5616abe4d..cef727669c8759dde6ce20ceb9ecc138d71a28bb 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)