[PATCH] staging: frontier: fix memory leak in usb_alphatrack_probe()
Dan Carpenter
dan.carpenter at oracle.com
Fri Mar 7 08:14:41 UTC 2014
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 at 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
More information about the devel
mailing list