Bluetooth: Host: Add NULL check for callback_list
If no callbacks have been registered then callback_list
is NULL, in which case we can skip searching.
This also fixes a NULL-pointer acces in the while loop
as previous_callback would be NULL when it gets
dereferenced as previous_callback->_next.
Signed-off-by:
Emil Gydesen <emil.gydesen@nordicsemi.no>
Loading
Please sign in to comment