diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-09-13 07:25:12 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-09-22 10:58:36 +0200 |
commit | 391499801b1b31f39c8e8ac382ac97f5e3742934 (patch) | |
tree | fec4943f60cb9b02aef969c709a5dc3f6183dd2a /drivers/hid/hid-lenovo-tpkbd.c | |
parent | Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-391499801b1b31f39c8e8ac382ac97f5e3742934.tar.xz linux-391499801b1b31f39c8e8ac382ac97f5e3742934.zip |
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 '')
-rw-r--r-- | drivers/hid/hid-lenovo-tpkbd.c | 2 |
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); } |