From: Axel Lin Date: Thu, 13 Sep 2012 05:25:12 +0000 (+0800) Subject: HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp() X-Git-Tag: v3.6-rc7~8^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=391499801b1b31f39c8e8ac382ac97f5e3742934;p=karo-tx-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 Acked-by: Bernhard Seibold Signed-off-by: Jiri Kosina --- 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); }