drivers/net/stmmac: seq_file fix memory leak
authorDjalal Harouni <tixxdz@opendz.org>
Sun, 20 May 2012 13:55:30 +0000 (13:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 May 2012 07:37:56 +0000 (03:37 -0400)
Use single_release() instead of seq_release() to free memory allocated
by single_open().

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index d07bc6de4387a9744c55dbb6cf692c2d9c9d64d3..70966330f44eca825d9456f5cea6723328c5e71b 100644 (file)
@@ -1640,7 +1640,7 @@ static const struct file_operations stmmac_rings_status_fops = {
        .open = stmmac_sysfs_ring_open,
        .read = seq_read,
        .llseek = seq_lseek,
-       .release = seq_release,
+       .release = single_release,
 };
 
 static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v)
@@ -1712,7 +1712,7 @@ static const struct file_operations stmmac_dma_cap_fops = {
        .open = stmmac_sysfs_dma_cap_open,
        .read = seq_read,
        .llseek = seq_lseek,
-       .release = seq_release,
+       .release = single_release,
 };
 
 static int stmmac_init_fs(struct net_device *dev)