Unregistering a SEP can trigger abort_cfm callback if some device is connected thus we should free setups list before 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 f67a593..7a2f3cf 100644 --- a/android/a2dp.c +++ b/android/a2dp.c @@ -1483,12 +1483,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