a2dp: Check for valid SEP in a2dp_reconfigure
authorPali Rohár <pali@kernel.org>
Sun, 3 May 2020 11:06:29 +0000 (13:06 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:49 +0000 (14:30 +0530)
commit5af4cbf41254ef8ab37a3e061a27ca1e30262f19
tree80e2aecd109ce636add9ab32bc33532ba89c622e
parent2f9a5235ca2cb865464d7a6ba93974d77d2d11bb
a2dp: Check for valid SEP in a2dp_reconfigure

a2dp_reconfigure() is called as callback when local and remote SEP does not
have to be valid anymore, sep->lsep can be NULL.

This change fixes bluetoothd daemon crash (dereferencing NULL sep->lsep)
when audio agent disconnect in the middle of the reconfigure call.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/audio/a2dp.c