linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp()
@ 2012-09-13  5:25 Axel Lin
  2012-09-14  9:35 ` Bernhard Seibold
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2012-09-13  5:25 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Bernhard Seibold, linux-input

We need to kfree names for led_mute and led_micmute in tpkbd_remove_tp().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/hid/hid-lenovo-tpkbd.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hid/hid-lenovo-tpkbd.c b/drivers/hid/hid-lenovo-tpkbd.c
index 77d2df0..60c4e1e 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);
 }
 
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-17 10:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13  5:25 [PATCH] HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp() Axel Lin
2012-09-14  9:35 ` Bernhard Seibold
2012-09-17 10:56   ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).