mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 07:50:04 +00:00
rtw88: fix seq_file memory leak
When using single_open(), single_release() should be used instead of seq_release(), otherwise there is a memory leak. This is detected by Coccinelle semantic patch. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
64827a6ac0
commit
eb9affaeff
@ -77,7 +77,7 @@ static const struct file_operations file_ops_single_r = {
|
||||
.open = rtw_debugfs_single_open_rw,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static const struct file_operations file_ops_single_rw = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user