Bluetooth: controller: split: Avoid ticker null pointer dereferencing

Avoid ticker from null pointer dereferencing when storing
operation callback functions to be called during collision
resolution.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2020-05-04 18:08:02 +05:30 committed by Carles Cufí
commit c2b7f15556

View file

@ -2032,7 +2032,8 @@ static inline void ticker_job_list_insert(struct ticker_instance *instance,
ticker_job_op_cb(user_op, status);
#if !defined(CONFIG_BT_TICKER_COMPATIBILITY_MODE)
if (ticker->ticks_periodic == 0U) {
if ((ticker->ticks_periodic == 0U) &&
user_op) {
ticker->fp_op_func =
user_op->fp_op_func;
ticker->op_context =