Hi Roman, On Thu, Jun 27, 2024 at 5:00 AM Roman Smirnov <r.smirnov@xxxxxx> wrote: > > 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); I'd move this check inside bass_bcast_src_free to make it safe to pass NULL pointers. > bcast_src->attr = attr; > } > > -- > 2.43.0 > > -- Luiz Augusto von Dentz