rtlwifi: Fix file release memory leak
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 4 Sep 2019 14:16:11 +0000 (14:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:51:11 +0000 (14:51 +0100)
commit16e5d407ae7361f225f6f16438f2729978a344f4
treeb635b60ff01bb1d0b2d7a513fc4293d97c3b4726
parentd676203b6ca00b2cb69cf3de4e95363b349618a9
rtlwifi: Fix file release memory leak

[ Upstream commit 4c3e48794dec7cb568974ba3bf2ab62b9c45ca3e ]

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: 610247f46feb ("rtlwifi: Improve debugging by using debugfs")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtlwifi/debug.c