Am Sonntag, 15. Oktober 2006 18:51 schrieb Marc-Antoine Avon Charreyron:
>         struct urb *urb;
>         struct urb *urb2;
>         urb = usb_alloc_urb(0, GFP_KERNEL);
>         if (!urb) {
>                 return -ENOMEM;
>         }
>         urb2 = usb_alloc_urb(0, GFP_KERNEL);
>         if (!urb2) {
>                 return -ENOMEM;

Memory leak. You need to free the first urb.

>         }
> 
>         usb_fill_int_urb(urb, dev->udev, usb_rcvintpipe(dev->udev, 0x81),
> dev->data_in_buffer1,
> dev->data_in_size, cb_read0, dev, 128);
>         usb_fill_int_urb(urb2, dev->udev, usb_rcvintpipe(dev->udev, 0x82),
> dev->data_in_buffer2, dev->data_in_size, cb_read1, dev, 128);
> 
>         retval = usb_submit_urb(urb, GFP_KERNEL);

You throw away that retval
>         retval = usb_submit_urb(urb2, GFP_KERNEL);

If you are reporting an error, kill the first urb.

        Regards
                Oliver
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to