avrcp: Fix segfault when using headset controls
authorDaniel Šimko <daniel@simko.xyz>
Sat, 10 Oct 2020 22:27:28 +0000 (22:27 +0000)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:33 +0000 (19:08 +0530)
commita88c934aa77216337677e6d522d07547fe19b1c1
tree07c0090bf88931de9b59b8f00a59622c9dce4fa6
parent8f51220c85f02639924744b8a97619a54f1d6a1d
avrcp: Fix segfault when using headset controls

This fixes a segmentation fault caused by controls trying to notify an
unregistered player.

When an unregistered player is replaced by another valid player from the
list, the session is not referenced in the sessions list of the player
and when this player is unregistered, its reference is not removed from
the session.

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