ChangeSet 1.1455.1.33, 2003/07/15 22:33:17-07:00, greg@kroah.com [PATCH] USB: fix memory leak in the visor driver. drivers/usb/serial/visor.c | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c Thu Jul 17 17:03:50 2003 +++ b/drivers/usb/serial/visor.c Thu Jul 17 17:03:50 2003 @@ -509,18 +509,17 @@ { struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + /* free up the transfer buffer, as usb_free_urb() does not do this */ + kfree (urb->transfer_buffer); + if (port_paranoia_check (port, __FUNCTION__)) return; dbg("%s - port %d", __FUNCTION__, port->number); - if (urb->status) { - dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); - return; - } - - /* free up the transfer buffer, as usb_free_urb() does not do this */ - kfree (urb->transfer_buffer); + if (urb->status) + dbg("%s - nonzero write bulk status received: %d", + __FUNCTION__, urb->status); schedule_work(&port->work); }