aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-09-13 01:25:12 -0400
committerJiri Kosina <jkosina@suse.cz>2012-09-22 04:58:36 -0400
commit391499801b1b31f39c8e8ac382ac97f5e3742934 (patch)
treefec4943f60cb9b02aef969c709a5dc3f6183dd2a /drivers/hid
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>
Diffstat (limited to 'drivers/hid')
-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)
519 led_classdev_unregister(&data_pointer->led_mute); 519 led_classdev_unregister(&data_pointer->led_mute);
520 520
521 hid_set_drvdata(hdev, NULL); 521 hid_set_drvdata(hdev, NULL);
522 kfree(data_pointer->led_micmute.name);
523 kfree(data_pointer->led_mute.name);
522 kfree(data_pointer); 524 kfree(data_pointer);
523} 525}
524 526