]> git.baikalelectronics.ru Git - kernel.git/commit
HID: elan: Fix memleak in elan_input_configured
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Mon, 31 Aug 2020 09:06:43 +0000 (17:06 +0800)
committerJiri Kosina <jkosina@suse.cz>
Tue, 1 Sep 2020 07:11:24 +0000 (09:11 +0200)
commit1abffac4cdfacdafd98b3024273f57c6fda3fc18
tree9cfe864249a487a7d27e47da36d3c3e3e0145fa2
parent4e4500c60855df475537c8864d0865c43b8c96f4
HID: elan: Fix memleak in elan_input_configured

When input_mt_init_slots() fails, input should be freed
to prevent memleak. When input_register_device() fails,
we should call input_mt_destroy_slots() to free memory
allocated by input_mt_init_slots().

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-elan.c