summaryrefslogtreecommitdiff
path: root/android/gatt.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2015-02-11 15:34:00 +0100
committerSzymon Janc <szymon.janc@tieto.com>2015-02-13 11:52:28 +0100
commit711e748eb33e5796293f5bb37a1c957c24c39c65 (patch)
tree54464605569955af531263d27adbdd6a38cad947 /android/gatt.c
parent6efb2b3f74d5780fc62b08d6240da8055f5bf665 (diff)
downloadbluez-711e748eb33e5796293f5bb37a1c957c24c39c65.tar.gz
android/gatt: Destroy app connections before destroying apps
This is the right destruction order to avoid dangling pointers. And it will actually matter when we make app connection destructor automatically notify apps about disconnection.
Diffstat (limited to 'android/gatt.c')
-rw-r--r--android/gatt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/android/gatt.c b/android/gatt.c
index b0ce1a8b4..f9cef4f54 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -7284,12 +7284,12 @@ void bt_gatt_unregister(void)
ipc_unregister(hal_ipc, HAL_SERVICE_ID_GATT);
hal_ipc = NULL;
- queue_destroy(gatt_apps, destroy_gatt_app);
- gatt_apps = NULL;
-
queue_destroy(app_connections, destroy_connection);
app_connections = NULL;
+ queue_destroy(gatt_apps, destroy_gatt_app);
+ gatt_apps = NULL;
+
queue_destroy(gatt_devices, destroy_device);
gatt_devices = NULL;