summaryrefslogtreecommitdiff
path: root/android/a2dp.c
diff options
context:
space:
mode:
authorAndrzej Kaczmarek <andrzej.kaczmarek@tieto.com>2014-02-10 11:45:45 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-02-10 13:22:57 +0200
commit4190ac1223f3da662facf8bdbdeccae698970345 (patch)
treee2132f19d9f402934e8c88fd2e6e29ebf6a23f32 /android/a2dp.c
parent496dd38b112221a7cbe1907d7768d8caa64d2326 (diff)
downloadbluez-4190ac1223f3da662facf8bdbdeccae698970345.tar.gz
android/a2dp: Fix audio deregistration
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.
Diffstat (limited to 'android/a2dp.c')
-rw-r--r--android/a2dp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/android/a2dp.c b/android/a2dp.c
index bef037dff..838ade8f0 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();
}