4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Agner stefan@agner.ch
commit e38c0ac55ee67cf3626cfbc2283f8873dc44d370 upstream.
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 Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
--- drivers/hid/hid-input.c | 1 + 1 file changed, 1 insertion(+)
--- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -1812,6 +1812,7 @@ void hidinput_disconnect(struct hid_devi input_unregister_device(hidinput->input); else input_free_device(hidinput->input); + kfree(hidinput->name); kfree(hidinput); }