All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: frontier: fix memory leak in usb_alphatrack_probe()
@ 2014-03-07  8:02 Daeseok Youn
  2014-03-07  8:14 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Daeseok Youn @ 2014-03-07  8:02 UTC (permalink / raw)
  To: gregkh
  Cc: d, paul.gortmaker, sara.bird.iar, dan.carpenter, standby24x7,
	devel, linux-kernel


oldi_buffer and write_buffer need to free when usb_alphatrack_delete()
is called.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/frontier/alphatrack.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c
index edd5cef..4d630da 100644
--- a/drivers/staging/frontier/alphatrack.c
+++ b/drivers/staging/frontier/alphatrack.c
@@ -208,6 +208,8 @@ static void usb_alphatrack_delete(struct usb_alphatrack *dev)
 	kfree(dev->ring_buffer);
 	kfree(dev->interrupt_in_buffer);
 	kfree(dev->interrupt_out_buffer);
+	kfree(dev->oldi_buffer);
+	kfree(dev->write_buffer);
 	kfree(dev);		/* fixme oldi_buffer */
 }
 
-- 
1.7.4.4



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

* Re: [PATCH] staging: frontier: fix memory leak in usb_alphatrack_probe()
  2014-03-07  8:02 [PATCH] staging: frontier: fix memory leak in usb_alphatrack_probe() Daeseok Youn
@ 2014-03-07  8:14 ` Dan Carpenter
  2014-03-07  8:20   ` DaeSeok Youn
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-03-07  8:14 UTC (permalink / raw)
  To: Daeseok Youn
  Cc: gregkh, d, paul.gortmaker, sara.bird.iar, standby24x7, devel,
	linux-kernel

On Fri, Mar 07, 2014 at 05:02:25PM +0900, Daeseok Youn wrote:
> 
> oldi_buffer and write_buffer need to free when usb_alphatrack_delete()
> is called.
> 
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
>  drivers/staging/frontier/alphatrack.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c
> index edd5cef..4d630da 100644
> --- a/drivers/staging/frontier/alphatrack.c
> +++ b/drivers/staging/frontier/alphatrack.c
> @@ -208,6 +208,8 @@ static void usb_alphatrack_delete(struct usb_alphatrack *dev)
>  	kfree(dev->ring_buffer);
>  	kfree(dev->interrupt_in_buffer);
>  	kfree(dev->interrupt_out_buffer);
> +	kfree(dev->oldi_buffer);
> +	kfree(dev->write_buffer);
>  	kfree(dev);		/* fixme oldi_buffer */
                                   ^^^^^^^^^^^^^^^^^
Remove this comment now?

regards,
dan carpenter


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

* Re: [PATCH] staging: frontier: fix memory leak in usb_alphatrack_probe()
  2014-03-07  8:14 ` Dan Carpenter
@ 2014-03-07  8:20   ` DaeSeok Youn
  0 siblings, 0 replies; 3+ messages in thread
From: DaeSeok Youn @ 2014-03-07  8:20 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg KH, d, paul.gortmaker, sara.bird.iar, Masanari Iida, devel,
	linux-kernel

OK. I will remove that comment and send again.

Thanks.
Daeseok Youn.

2014-03-07 17:14 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> On Fri, Mar 07, 2014 at 05:02:25PM +0900, Daeseok Youn wrote:
>>
>> oldi_buffer and write_buffer need to free when usb_alphatrack_delete()
>> is called.
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>>  drivers/staging/frontier/alphatrack.c |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c
>> index edd5cef..4d630da 100644
>> --- a/drivers/staging/frontier/alphatrack.c
>> +++ b/drivers/staging/frontier/alphatrack.c
>> @@ -208,6 +208,8 @@ static void usb_alphatrack_delete(struct usb_alphatrack *dev)
>>       kfree(dev->ring_buffer);
>>       kfree(dev->interrupt_in_buffer);
>>       kfree(dev->interrupt_out_buffer);
>> +     kfree(dev->oldi_buffer);
>> +     kfree(dev->write_buffer);
>>       kfree(dev);             /* fixme oldi_buffer */
>                                    ^^^^^^^^^^^^^^^^^
> Remove this comment now?
>
> regards,
> dan carpenter
>

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

end of thread, other threads:[~2014-03-07  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07  8:02 [PATCH] staging: frontier: fix memory leak in usb_alphatrack_probe() Daeseok Youn
2014-03-07  8:14 ` Dan Carpenter
2014-03-07  8:20   ` DaeSeok Youn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.