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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make bass_bcast_src_free() safe for passing NULL pointers.
---
 src/shared/bass.c | 3 +++
 1 file changed, 3 insertions(+)

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);
 
-- 
2.43.0





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux