diff options
author | Miaoqian Lin <linmq006@gmail.com> | 2022-04-16 07:37:21 +0000 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-04-21 11:38:28 +0200 |
commit | 1af20714fedad238362571620be0bd690ded05b6 (patch) | |
tree | 614364f9b462e9ddb7607521108e15b71e74481b /net | |
parent | 116c3f4a78ebe478d5ad5a038baf931e93e7d748 (diff) | |
download | linux-stable-1af20714fedad238362571620be0bd690ded05b6.tar.gz linux-stable-1af20714fedad238362571620be0bd690ded05b6.tar.bz2 linux-stable-1af20714fedad238362571620be0bd690ded05b6.zip |
HID: elan: Fix potential double free in elan_input_configured
'input' is a managed resource allocated with devm_input_allocate_device(),
so there is no need to call input_free_device() explicitly or
there will be a double free.
According to the doc of devm_input_allocate_device():
* Managed input devices do not need to be explicitly unregistered or
* freed as it will be done automatically when owner device unbinds from
* its driver (or binding fails).
Fixes: b7429ea53d6c ("HID: elan: Fix memleak in elan_input_configured")
Fixes: 9a6a4193d65b ("HID: Add driver for USB ELAN Touchpad")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions