Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wei Yongjun and committed by
Kalle Valo
eb9affae 64827a6a

+1 -1
+1 -1
drivers/net/wireless/realtek/rtw88/debug.c
··· 77 77 .open = rtw_debugfs_single_open_rw, 78 78 .read = seq_read, 79 79 .llseek = seq_lseek, 80 - .release = seq_release, 80 + .release = single_release, 81 81 }; 82 82 83 83 static const struct file_operations file_ops_single_rw = {