提交 74863948 编写于 作者: D Djalal Harouni 提交者: 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: NDjalal Harouni <tixxdz@opendz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 17eea0df
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册