]> git.baikalelectronics.ru Git - kernel.git/commit
HID: hid-bigbenff: fix general protection fault caused by double kfree
authorHanno Zulla <kontakt@hanno.de>
Tue, 18 Feb 2020 11:37:47 +0000 (12:37 +0100)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 18 Feb 2020 13:43:45 +0000 (14:43 +0100)
commit5f4cd7114708ea1b5624736045f2b448eedf2d73
tree8f4e8b7be70806234ce887305a629abcf44b2638
parent8627a4f94b1a24d88f885451c0d96d6f1679d2a9
HID: hid-bigbenff: fix general protection fault caused by double kfree

The struct *bigben was allocated via devm_kzalloc() and then used as a
parameter in input_ff_create_memless(). This caused a double kfree
during removal of the device, since both the managed resource API and
ml_ff_destroy() in drivers/input/ff-memless.c would call kfree() on it.

Signed-off-by: Hanno Zulla <kontakt@hanno.de>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/hid-bigbenff.c