]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp()
authorAxel Lin <axel.lin@gmail.com>
Thu, 13 Sep 2012 05:25:12 +0000 (13:25 +0800)
committerJiri Kosina <jkosina@suse.cz>
Sat, 22 Sep 2012 08:58:36 +0000 (10:58 +0200)
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>
drivers/hid/hid-lenovo-tpkbd.c

index 77d2df04c97b0dbe6c34eb11b9e566ae07d5ae28..60c4e1e85913fd435ba7c3fe977db50e4fb00f6c 100644 (file)
@@ -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);
 }