staging: frontier: fix memory leak in usb_alphatrack_probe()
authorDaeseok Youn <daeseok.youn@gmail.com>
Fri, 7 Mar 2014 08:25:55 +0000 (17:25 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Mar 2014 06:39:40 +0000 (22:39 -0800)
oldi_buffer and write_buffer need to free when usb_alphatrack_delete()
is called.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/frontier/alphatrack.c

index edd5cef300d034a5709542058ca9c4e1159125e3..e59ee51ccbacc9ef74b4d88c328650c56f020843 100644 (file)
@@ -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 */