Online Linux Driver Verification Service (alpha)

0068

RULE_ERROR

Incorrect release of USB information structures

Description

Resources allocated by usb_alloc_urb() should be correctly freed by usb_free_urb().

Links:

bugfix example 2.6.24 -> 2.6.25

Example

Sample usage in drivers/bluetooth/bpa10x.c:

// around line 378
urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb)
    return -ENOMEM;
...
default:
    /* mandatory release of allocated region*/
    usb_free_urb(urb);