From: Wei Yongjun Date: Wed, 4 Sep 2019 14:16:01 +0000 (+0000) Subject: rtw88: fix seq_file memory leak X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=eb9affaeff701ce90fcf476ff5332624f9d0ddd2;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c index 5d235968d475..6ad985e98e42 100644 --- a/drivers/net/wireless/realtek/rtw88/debug.c +++ b/drivers/net/wireless/realtek/rtw88/debug.c @@ -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 = {