From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> If the browsing channel is disconnected it should be destroyed immediatelly and set to NULL otherwise it will point to invalid channel. --- profiles/audio/avctp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index 6ad2b66..6cac718 100644 --- a/profiles/audio/avctp.c +++ b/profiles/audio/avctp.c @@ -485,6 +485,10 @@ static void avctp_set_state(struct avctp *session, avctp_state_t new_state) break; case AVCTP_STATE_CONNECTED: DBG("AVCTP Connected"); + if (session->browsing) { + avctp_channel_destroy(session->browsing); + session->browsing = NULL; + } break; case AVCTP_STATE_BROWSING_CONNECTING: DBG("AVCTP Browsing Connecting"); -- 1.8.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html