Bug #1237
open68_1 model is incomplete without usb_get_urb()
0%
Description
usb_get_urb() and usb_free_urb() are dual functions, so it is not correct to have just one of them in the model.
Updated by Vadim Mutilin over 13 years ago
The functions usb_get_urb and usb_free_urb are not dual actually, because usb_free_urb may be called without usb_get_urb
and the function usb_get_urb does not allocates memory, so it can't be called without usb_alloc_urb.
Therefore the topic of the bug is correct, but the right description of the bug is that for each call usb_get_urb() with nonzero parameter there are must be the call to usb_free_urb with the same parameter.
If you have any unsafes with usb_get_urb, it will be helpful to check that the call to usb_alloc_urb was performed before usb_get_urb. Without it the false unsafes will not go out even with the new model function.
Updated by Pavel Shved over 13 years ago
- Category set to Rules and Models
- Assignee set to Vadim Mutilin