a2dp: set session to NULL when freeing channel
authorArchie Pusaka <apusaka@chromium.org>
Fri, 5 Feb 2021 03:47:46 +0000 (11:47 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:34 +0000 (19:08 +0530)
commitd84187e8b71fb71677ad06f914a0da3e734020c3
tree287b04aab51bbe0369b2cf6d60b8f8aaa155de92
parent4b59202b88c6561e08182044f97fa3d468121017
a2dp: set session to NULL when freeing channel

There is a possibility that avdtp_channel is freed when avdtp_setup
is not yet freed. This could cause crashes because setup->chan will
then point to an invalid address.

Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/audio/a2dp.c
profiles/audio/a2dp.h
profiles/audio/avdtp.c
profiles/audio/sink.c
profiles/audio/source.c