summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorStefan Agner <stefan@agner.ch>2018-08-28 14:29:55 +0300
committerJiri Kosina <jkosina@suse.cz>2018-08-28 15:06:34 +0300
commite38c0ac55ee67cf3626cfbc2283f8873dc44d370 (patch)
tree2ea11784fa1f30e1682f6644b54a479222730b00 /drivers/hid/hid-input.c
parentee345492437043a79db058a3d4f029ebcb52089a (diff)
downloadlinux-e38c0ac55ee67cf3626cfbc2283f8873dc44d370.tar.xz
HID: input: fix leaking custom input node name
Make sure to free the custom input node name on disconnect. Cc: stable@vger.kernel.org # v4.18+ Fixes: c554bb045511 ("HID: input: append a suffix matching the application") Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 4e94ea3e280a..ac201817a2dd 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1815,6 +1815,7 @@ void hidinput_disconnect(struct hid_device *hid)
input_unregister_device(hidinput->input);
else
input_free_device(hidinput->input);
+ kfree(hidinput->name);
kfree(hidinput);
}