aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin2012-09-13 13:25:12 +0800
committerJiri Kosina2012-09-22 10:58:36 +0200
commit391499801b1b31f39c8e8ac382ac97f5e3742934 (patch)
treefec4943f60cb9b02aef969c709a5dc3f6183dd2a
parent5b6e7f1c169db10632459c28f148011e039187bd (diff)
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>
-rw-r--r--drivers/hid/hid-lenovo-tpkbd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-lenovo-tpkbd.c b/drivers/hid/hid-lenovo-tpkbd.c
index 77d2df04c97b..60c4e1e85913 100644
--- a/drivers/hid/hid-lenovo-tpkbd.c
+++ b/drivers/hid/hid-lenovo-tpkbd.c
@@ -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);
}