Diff between 8e76c9140de1211588a72bf080cc45299256ce83 and 6dafe901a2bae49048968872e0854cc47cfec45b
Changed Files
| File | Additions | Deletions | Status |
| src/shared/bap.c | +1 | -1 | modified |
Full Patch
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 4722ed1..804352d 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -1033,7 +1033,7 @@ static void stream_notify_metadata(struct bt_bap_stream *stream)
static struct bt_bap *bt_bap_ref_safe(struct bt_bap *bap)
{
- if (!bap || !bap->ref_count)
+ if (!bap || !bap->ref_count || !queue_find(sessions, NULL, bap))
return NULL;
return bt_bap_ref(bap);