Message ID | 20240628105521.540629-1-r.smirnov@omp.ru |
---|---|
State | New |
Headers | show |
Series | [BlueZ,v1] a2dp: add NULL check to a2dp_reconfig() | expand |
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c index a3c294bc3..3f9deb9f8 100644 --- a/profiles/audio/a2dp.c +++ b/profiles/audio/a2dp.c @@ -1893,7 +1893,8 @@ static int a2dp_reconfig(struct a2dp_channel *chan, const char *sender, } /* Check if stream is for the channel */ - if (!avdtp_has_stream(chan->session, tmp->stream)) + if (!chan->session || + !avdtp_has_stream(chan->session, tmp->stream)) continue; err = avdtp_close(chan->session, tmp->stream, FALSE);