summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-09-13 09:25:12 +0400
committerJiri Kosina <jkosina@suse.cz>2012-09-22 12:58:36 +0400
commit391499801b1b31f39c8e8ac382ac97f5e3742934 (patch)
treefec4943f60cb9b02aef969c709a5dc3f6183dd2a
parent5b6e7f1c169db10632459c28f148011e039187bd (diff)
downloadlinux-391499801b1b31f39c8e8ac382ac97f5e3742934.tar.xz
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);
}