ChangeSet 1.1500.8.16, 2004/02/02 13:45:57-08:00, oliver@neukum.org [PATCH] USB: fix URB leak in belkin driver if submission of the interrupt URb fails in belkin_sa_open() the previously submitted URB may remain live. The rest of the system thinks that opening failed, therefore the URB should be unlinked in the error case. drivers/usb/serial/belkin_sa.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c Mon Feb 9 14:39:56 2004 +++ b/drivers/usb/serial/belkin_sa.c Mon Feb 9 14:39:56 2004 @@ -232,8 +232,10 @@ port->interrupt_in_urb->dev = port->serial->dev; retval = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); - if (retval) + if (retval) { + usb_unlink_urb(port->read_urb); err(" usb_submit_urb(read int) failed"); + } exit: return retval;