summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDjalal Harouni <tixxdz@opendz.org>2012-05-20 15:55:30 +0200
committerDavid S. Miller <davem@davemloft.net>2012-05-21 09:37:56 +0200
commit74863948f925d9f3bb4e3d3a783e49e9c662d839 (patch)
tree4839624b0a87942c6238f97ba885ee96311c0b12 /drivers/net
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-74863948f925d9f3bb4e3d3a783e49e9c662d839.tar.xz
linux-74863948f925d9f3bb4e3d3a783e49e9c662d839.zip
drivers/net/stmmac: seq_file fix memory leak
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index d07bc6de4387..70966330f44e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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)