* [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
* Re: [PATCH] HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp()
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
0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Seibold @ 2012-09-14 9:35 UTC (permalink / raw)
To: Axel Lin; +Cc: Jiri Kosina, linux-input
On Thu, 13 Sep 2012 13:25:12 +0800
Axel Lin <axel.lin@gmail.com> wrote:
> 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>
> ---
> 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);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: lenovo-tpkbd: Fix memory leak in tpkbd_remove_tp()
2012-09-14 9:35 ` Bernhard Seibold
@ 2012-09-17 10:56 ` Jiri Kosina
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2012-09-17 10:56 UTC (permalink / raw)
To: Bernhard Seibold; +Cc: Axel Lin, linux-input
On Fri, 14 Sep 2012, Bernhard Seibold wrote:
> On Thu, 13 Sep 2012 13:25:12 +0800
> Axel Lin <axel.lin@gmail.com> wrote:
>
> > 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>
Applied, thanks.
> > ---
> > 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);
> > }
> >
>
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [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).