Some drivers set the device instance list to NULL in their scan() callback. This means the driver loses all references to any devices contained in that list and their resources will be leaked. Drivers can't free the devices at this point either since an application might still use a device on the list. So the existing devices on the instance list need to remain unmodified during the scan() callback, even if that means that there will be duplicates on the instance list. Only an explicit invocation of sr_dev_clear() by the application is allowed to free the devices on the instance list and reset the list. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> |
||
---|---|---|
.. | ||
api.c | ||
protocol.c | ||
protocol.h |