mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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: Axel Lin <[email protected]> Acked-by: Bernhard Seibold <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
5b6e7f1c16
commit
391499801b
1 changed files with 2 additions and 0 deletions
|
|
@ -519,6 +519,8 @@ static void tpkbd_remove_tp(struct hid_device *hdev)
|
|||
led_classdev_unregister(&data_pointer->led_mute);
|
||||
|
||||
hid_set_drvdata(hdev, NULL);
|
||||
kfree(data_pointer->led_micmute.name);
|
||||
kfree(data_pointer->led_mute.name);
|
||||
kfree(data_pointer);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue