avctp: Fix possible crash when accepting browsing channel
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 14 Nov 2018 11:35:37 +0000 (13:35 +0200)
committerhimanshu <h.himanshu@samsung.com>
Tue, 14 Jan 2020 08:53:35 +0000 (14:23 +0530)
commit37d91321a373dee136c516821b6083105cdefecc
treea15b3f233dda2c8add341e431d2933e672431a24
parent99de84b32ec8ba3a643b27343736e089286c6796
avctp: Fix possible crash when accepting browsing channel

In order to stop the bt_io_accept from calling the callback with
invalid session, if that is disconnected in the meantime, create the
channel so it can properly be destroyed thus stopping the callback from
being called.

Change-Id: If89847141f3062361cbc0b8a1235eeee0e7edf34
Signed-off-by: himanshu <h.himanshu@samsung.com>
profiles/audio/avctp.c