This prevents a null pointer from being dereferenced in case queue_find() returns NULL. --- src/shared/bass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/bass.c b/src/shared/bass.c index c30537dee..f08799714 100644 --- a/src/shared/bass.c +++ b/src/shared/bass.c @@ -875,7 +875,8 @@ static void bass_handle_add_src_op(struct bt_bass *bass, attr); queue_remove(bass->ldb->bcast_srcs, src); - bass_bcast_src_free(src); + if (src) + bass_bcast_src_free(src); bcast_src->attr = attr; } -- 2.43.0