Hi,

memory allocated must be freed in the error case.

        Regards
                Oliver

Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]>
-- 

--- linux-2.6.21-rc4/drivers/usb/serial/omninet.c.alt   2007-03-20 
13:09:01.000000000 +0100
+++ linux-2.6.21-rc4/drivers/usb/serial/omninet.c       2007-03-20 
13:09:49.000000000 +0100
@@ -170,8 +170,12 @@
                      port->read_urb->transfer_buffer, 
port->read_urb->transfer_buffer_length,
                      omninet_read_bulk_callback, port);
        result = usb_submit_urb(port->read_urb, GFP_KERNEL);
-       if (result)
+       if (result) {
                err("%s - failed submitting read urb, error %d", __FUNCTION__, 
result);
+               /* open failed - all allocations must be freed */
+               kfree(od);
+               usb_set_serial_port_data(port, NULL);
+       }
 
        return result;
 }
 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to