Unregistering a SEP can trigger abort_cfm callback if some device is connected thus we should free setups list after all endpoints are unregistered to avoid error in abort_cfm due to non-existing setup. --- android/a2dp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/a2dp.c b/android/a2dp.c index bef037d..838ade8 100644 --- a/android/a2dp.c +++ b/android/a2dp.c @@ -1481,12 +1481,12 @@ static void bt_audio_unregister(void) if (audio_retry_id > 0) g_source_remove(audio_retry_id); - g_slist_free_full(setups, setup_free); - setups = NULL; - g_slist_free_full(endpoints, unregister_endpoint); endpoints = NULL; + g_slist_free_full(setups, setup_free); + setups = NULL; + audio_ipc_cleanup(); } -- 1.8.5.3 -- 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