提交 4c3e4879 编写于 作者: W Wei Yongjun 提交者: Kalle Valo

rtlwifi: Fix file release memory leak

When using single_open() for opening, single_release() should be
used instead of seq_release(), otherwise there is a memory leak.

This is detected by Coccinelle semantic patch.

Fixes: 610247f4 ("rtlwifi: Improve debugging by using debugfs")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 eb9affae
......@@ -88,7 +88,7 @@ static const struct file_operations file_ops_common = {
.open = dl_debug_open_common,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = single_release,
};
static int rtl_debug_get_mac_page(struct seq_file *m, void *v)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册