Bluetooth: BAP: Broadcast start add missing NULL check for adv

Added missing NULL check for the advertising set pointer.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2023-05-09 15:13:45 +02:00 committed by Carles Cufí
commit afd4161a84

View file

@ -943,6 +943,11 @@ int bt_bap_broadcast_source_start(struct bt_bap_broadcast_source *source, struct
return -EINVAL;
}
CHECKIF(adv == NULL) {
LOG_DBG("adv is NULL");
return -EINVAL;
}
broadcast_state = broadcast_source_get_state(source);
if (broadcast_source_get_state(source) != BT_BAP_EP_STATE_QOS_CONFIGURED) {
LOG_DBG("Broadcast source invalid state: %u", broadcast_state);