Commit 39149980 authored by Axel Lin's avatar Axel Lin Committed by Jiri Kosina

HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp()

We need to kfree names for led_mute and led_micmute in tpkbd_remove_tp().
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarBernhard Seibold <mail@bernhard-seibold.de>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 5b6e7f1c
...@@ -519,6 +519,8 @@ static void tpkbd_remove_tp(struct hid_device *hdev) ...@@ -519,6 +519,8 @@ static void tpkbd_remove_tp(struct hid_device *hdev)
led_classdev_unregister(&data_pointer->led_mute); led_classdev_unregister(&data_pointer->led_mute);
hid_set_drvdata(hdev, NULL); hid_set_drvdata(hdev, NULL);
kfree(data_pointer->led_micmute.name);
kfree(data_pointer->led_mute.name);
kfree(data_pointer); kfree(data_pointer);
} }
......
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