From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ v3 2/5] shared/bap: Check if stream is valid before attempting to release
Date: Mon, 29 Jun 2026 10:26:46 -0400 [thread overview]
Message-ID: <20260629142649.966025-2-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20260629142649.966025-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
bt_bap_stream_release shall check if the stream is still valid before
attempting to release it just as done with other operations.
---
src/shared/bap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 6f2f4fc11f7c..9dd07bc5f2e2 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -6727,6 +6727,9 @@ unsigned int bt_bap_stream_release(struct bt_bap_stream *stream,
unsigned int id;
struct bt_bap *bap;
+ if (!bap_stream_valid(stream))
+ return 0;
+
if (!stream || !stream->ops || !stream->ops->release)
return 0;
--
2.54.0
next prev parent reply other threads:[~2026-06-29 14:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 14:26 [PATCH BlueZ v3 1/5] bass: Fix possible crash on bass_update_bis_sync Luiz Augusto von Dentz
2026-06-29 14:26 ` Luiz Augusto von Dentz [this message]
2026-06-29 14:26 ` [PATCH BlueZ v3 3/5] shared/bap: Don't transition to IDLE inside bap_bcast_set_state Luiz Augusto von Dentz
2026-06-29 14:26 ` [PATCH BlueZ v3 4/5] shared/bap: Use queue_foreach to notify state changes Luiz Augusto von Dentz
2026-06-29 17:37 ` [BlueZ,v3,1/5] bass: Fix possible crash on bass_update_bis_sync bluez.test.bot
2026-06-30 20:32 ` [PATCH BlueZ v3 1/5] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260629142649.966025-2-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.