Commit ba1de437 authored by Wei Yongjun's avatar Wei Yongjun Committed by Ulf Hansson
Browse files

mmc: debugfs: 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.

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20220608090152.179395-1-weiyongjun1@huawei.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 3576c0b2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -295,6 +295,7 @@ static const struct file_operations mmc_err_stats_fops = {
	.open	= mmc_err_stats_open,
	.read	= seq_read,
	.write	= mmc_err_stats_write,
	.release = single_release,
};

void mmc_add_host_debugfs(struct mmc_host *host)