diff mbox series

[BlueZ,1/1] bap: Fix crash in bap_bcast_remove

Message ID 20240716081131.14893-2-iulia.tanasescu@nxp.com (mailing list archive)
State Accepted
Commit 0bad3d5cbea84b24d53e86de7c419e893bb19a93
Headers show
Series bap: Fix crash in bap_bcast_remove | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Iulia Tanasescu July 16, 2024, 8:11 a.m. UTC
This adds a check for the PA request dequeued in bap_bcast_remove,
to avoid accessing a member within a NULL pointer.
---
 profiles/audio/bap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

bluez.test.bot@gmail.com July 16, 2024, 9:46 a.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=871594

---Test result---

Test Summary:
CheckPatch                    PASS      0.41 seconds
GitLint                       PASS      0.30 seconds
BuildEll                      PASS      24.97 seconds
BluezMake                     PASS      1753.70 seconds
MakeCheck                     PASS      13.13 seconds
MakeDistcheck                 PASS      178.55 seconds
CheckValgrind                 PASS      252.50 seconds
CheckSmatch                   PASS      358.86 seconds
bluezmakeextell               PASS      121.95 seconds
IncrementalBuild              PASS      1489.90 seconds
ScanBuild                     PASS      1025.78 seconds



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c
index afa938091..16c02524f 100644
--- a/profiles/audio/bap.c
+++ b/profiles/audio/bap.c
@@ -3194,7 +3194,7 @@  static void bap_bcast_remove(struct btd_service *service)
 	 */
 	req = queue_remove_if(data->adapter->bcast_pa_requests,
 						match_service, service);
-	if (req->io_id) {
+	if (req && req->io_id) {
 		g_source_remove(req->io_id);
 		req->io_id = 0;
 	}