From: Daeseok Youn Date: Fri, 7 Mar 2014 08:25:55 +0000 (+0900) Subject: staging: frontier: fix memory leak in usb_alphatrack_probe() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95ad0724738c30e47f35d37d4dcf1c4cce4e94c5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: frontier: fix memory leak in usb_alphatrack_probe() oldi_buffer and write_buffer need to free when usb_alphatrack_delete() is called. Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/frontier/alphatrack.c b/drivers/staging/frontier/alphatrack.c index edd5cef300d0..e59ee51ccbac 100644 --- a/drivers/staging/frontier/alphatrack.c +++ b/drivers/staging/frontier/alphatrack.c @@ -208,7 +208,9 @@ 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); /* fixme oldi_buffer */ + kfree(dev->oldi_buffer); + kfree(dev->write_buffer); + kfree(dev); } /** usb_alphatrack_interrupt_in_callback */