a2dp: Fix crash on transport_cb
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 1 Jun 2020 21:25:30 +0000 (14:25 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:49 +0000 (14:30 +0530)
commit524e1b22c3092f7c41f2d23a4d1d4345b10b5e2d
treee55e6b996af57444c0448a4a4d9c0727268867e0
parente00ebfee9c10b07461fb29c75168dda71e750028
a2dp: Fix crash on transport_cb

There have been reports of crashes on transport_cb where the setup
would most likely already have been freed but transport_cb would still
be called, so instead of assuming the setup pointer would be valid try
to lookup the list of active setups and log a warning when it happens.

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