Skip to content

Commit

Permalink
HID: input: fix leaking custom input node name
Browse files Browse the repository at this point in the history
Make sure to free the custom input node name on disconnect.

Cc: stable@vger.kernel.org # v4.18+
Fixes: c554bb0 ("HID: input: append a suffix matching the application")
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Stefan Agner authored and Jiri Kosina committed Aug 28, 2018
1 parent ee34549 commit e38c0ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e38c0ac

Please sign in to comment.