Commit 74863948 authored by Djalal Harouni's avatar Djalal Harouni Committed by David S. Miller

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: default avatarDjalal Harouni <tixxdz@opendz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 17eea0df
...@@ -1640,7 +1640,7 @@ static const struct file_operations stmmac_rings_status_fops = { ...@@ -1640,7 +1640,7 @@ static const struct file_operations stmmac_rings_status_fops = {
.open = stmmac_sysfs_ring_open, .open = stmmac_sysfs_ring_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = single_release,
}; };
static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v) 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 = { ...@@ -1712,7 +1712,7 @@ static const struct file_operations stmmac_dma_cap_fops = {
.open = stmmac_sysfs_dma_cap_open, .open = stmmac_sysfs_dma_cap_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = single_release,
}; };
static int stmmac_init_fs(struct net_device *dev) static int stmmac_init_fs(struct net_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment