mirror of https://gitee.com/openkylin/linux.git
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 <axel.lin@gmail.com> Acked-by: Bernhard Seibold <mail@bernhard-seibold.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
5b6e7f1c16
commit
391499801b
|
@ -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 New Issue