diff mbox series

[BlueZ,v1] bass: add NULL check to bass_bcast_src_free()

Message ID 20240628073542.20896-1-r.smirnov@omp.ru (mailing list archive)
State Accepted
Commit 920c4576907dfe292c733be4c413a49bd8fffe66
Headers show
Series [BlueZ,v1] bass: add NULL check to bass_bcast_src_free() | 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

Roman Smirnov June 28, 2024, 7:35 a.m. UTC
Make bass_bcast_src_free() safe for passing NULL pointers.
---
 src/shared/bass.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

bluez.test.bot@gmail.com June 28, 2024, 9:44 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=866446

---Test result---

Test Summary:
CheckPatch                    PASS      0.30 seconds
GitLint                       PASS      0.22 seconds
BuildEll                      PASS      24.28 seconds
BluezMake                     PASS      1675.34 seconds
MakeCheck                     PASS      13.67 seconds
MakeDistcheck                 PASS      183.04 seconds
CheckValgrind                 PASS      257.89 seconds
CheckSmatch                   PASS      360.58 seconds
bluezmakeextell               PASS      123.47 seconds
IncrementalBuild              PASS      1527.30 seconds
ScanBuild                     PASS      1038.10 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org June 28, 2024, 3:10 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Fri, 28 Jun 2024 10:35:41 +0300 you wrote:
> Make bass_bcast_src_free() safe for passing NULL pointers.
> ---
>  src/shared/bass.c | 3 +++
>  1 file changed, 3 insertions(+)

Here is the summary with links:
  - [BlueZ,v1] bass: add NULL check to bass_bcast_src_free()
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=920c4576907d

You are awesome, thank you!
diff mbox series

Patch

diff --git a/src/shared/bass.c b/src/shared/bass.c
index c30537dee..d82c043ac 100644
--- a/src/shared/bass.c
+++ b/src/shared/bass.c
@@ -1272,6 +1272,9 @@  static void bass_bcast_src_free(void *data)
 {
 	struct bt_bcast_src *bcast_src = data;
 
+	if (!bcast_src)
+		return;
+
 	for (int i = 0; i < bcast_src->num_subgroups; i++)
 		free(bcast_src->subgroup_data[i].meta);