ChangeSet 1.1455.1.33, 2003/07/15 22:33:17-07:00, [EMAIL PROTECTED]

[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);
 }



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to