a2dp: Fix crash on discover_cb 15/258115/5
authorWootak Jung <wootak.jung@samsung.com>
Tue, 11 May 2021 02:10:53 +0000 (11:10 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Tue, 11 May 2021 02:43:37 +0000 (11:43 +0900)
commit1fe6e658d4ed2f6d288d6280775297494259a0b0
treed35ece4c3d0363b1735b3c7db4159c6387db57e1
parentb4da3c4cc6ce4e42c5471b694bdf88654df432e8
a2dp: Fix crash on discover_cb

There have been reports of crashes on discover_cb where the setup
would most likely already have been freed but discover_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.

Change-Id: Icca1608c48be43174492d69204c8d31b158a99df
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
profiles/audio/a2dp.c