mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
gpio: mockup: add missing single_release()
When using single_open() for opening, single_release() should be
used instead of seq_release(), otherwise there is a memory leak.
Fixes: 2a9e27408e
("gpio: mockup: rework debugfs interface")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
f74c2bb987
commit
59929d3a2e
@ -309,6 +309,7 @@ static const struct file_operations gpio_mockup_debugfs_ops = {
|
||||
.read = gpio_mockup_debugfs_read,
|
||||
.write = gpio_mockup_debugfs_write,
|
||||
.llseek = no_llseek,
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
static void gpio_mockup_debugfs_setup(struct device *dev,
|
||||
|
Loading…
Reference in New Issue
Block a user