Bluetooth: Audio: Fix broadcast sink null pointer in cleanup

Fix potential null pointer acceess in
broadcast_sink_cleanup_streams.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2022-03-21 20:04:56 +01:00 committed by Carles Cufí
commit 868806c211

View file

@ -849,8 +849,11 @@ static void broadcast_sink_cleanup_streams(struct bt_audio_broadcast_sink *sink)
stream = &sink->streams[i];
stream->ep->stream = NULL;
stream->ep = NULL;
if (stream->ep != NULL) {
stream->ep->stream = NULL;
stream->ep = NULL;
}
stream->qos = NULL;
stream->codec = NULL;
stream->iso = NULL;