diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2022-06-08 12:01:52 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-07-12 13:25:36 +0300 |
commit | ba1de43768aa27865169af00ee0c2a4a165690b6 (patch) | |
tree | 60680da5fa861a7f85075a47d8f2c5920712438f /drivers/mmc | |
parent | 3576c0b2709c8204a18371d5f8b44a724234ffe7 (diff) | |
download | linux-ba1de43768aa27865169af00ee0c2a4a165690b6.tar.xz |
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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20220608090152.179395-1-weiyongjun1@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/debugfs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 75e98ec88fb9..fe6808771bc7 100644 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c @@ -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) |