]> git.baikalelectronics.ru Git - kernel.git/commit
HID: core: fix memory leak on probe
authorStefan Agner <stefan@agner.ch>
Tue, 28 Aug 2018 11:29:54 +0000 (13:29 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 28 Aug 2018 12:07:16 +0000 (14:07 +0200)
commit57c2674a4e16d3f1c44c211aa7d5c2449e52e5dd
tree4b6c5124e572372f3d9fd332b149ca11be0511f5
parent4a2f61955ddbab983ed243889739213c3cee8ead
HID: core: fix memory leak on probe

The dynamically allocted collection stack does not get freed in
all situations. Make sure to also free the collection stack when
using the parser in hid_open_report().

Fixes: b5937f7ac5ec ("HID: core: do not upper bound the collection stack")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c