From 18fe3cf498d046c2329e7ad75e585ed3b9ed1627 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 27 Aug 2015 13:23:54 +0300 Subject: [PATCH] audio/avrcp: Fix invalid read Player pointer cannot be used after being freed. --- profiles/audio/avrcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 76e89afe7..fa95bf9f2 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -3942,9 +3942,10 @@ void avrcp_unregister_player(struct avrcp_player *player) target->player = g_slist_nth_data(server->players, 0); } - player_destroy(player); avrcp_player_event(player, AVRCP_EVENT_AVAILABLE_PLAYERS_CHANGED, NULL); + + player_destroy(player); } static gboolean avrcp_handle_set_volume(struct avctp *conn, -- 2.47.3