From 95ad0724738c30e47f35d37d4dcf1c4cce4e94c5 Mon Sep 17 00:00:00 2001 From: Daeseok Youn Date: Fri, 7 Mar 2014 17:25:55 +0900 Subject: [PATCH] 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 --- drivers/staging/frontier/alphatrack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */