Commit e38c0ac5 authored by Stefan Agner's avatar Stefan Agner Committed by Jiri Kosina

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: c554bb04 ("HID: input: append a suffix matching the application")
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent ee345492
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment