Diff between d159973ecec8e65add01cb5ed8213e0ba8703965 and 414c8650acfe871ea6ae860d7dca1b5fa9044b77

Changed Files

File Additions Deletions Status
profiles/audio/bap.c +3 -2 modified

Full Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index ae944b6..8f24117 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -998,9 +998,10 @@ static void bap_state(struct bt_bap_stream *stream, uint8_t old_state,
 	switch (new_state) {
 	case BT_BAP_STREAM_STATE_IDLE:
 		/* Release stream if idle */
-		if (ep)
+		if (ep) {
 			bap_io_close(ep);
-		else
+			ep->stream = NULL;
+		} else
 			queue_remove(data->streams, stream);
 		break;
 	case BT_BAP_STREAM_STATE_CONFIG: