Diff between 63e020f54fe078db59f691fdcff5f4b7c3ee5f39 and 3f6e7d45cee4dd48e8c5851e394f9e1059e5d600

Changed Files

File Additions Deletions Status
src/device.c +3 -0 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index fd177f4..0d3a655 100644
--- a/src/device.c
+++ b/src/device.c
@@ -626,6 +626,9 @@ static void device_free(gpointer user_data)
 	g_slist_free_full(device->attios_offline, g_free);
 	g_slist_free_full(device->svc_callbacks, svc_dev_remove);
 
+	/* Reset callbacks since the device is going to be freed */
+	gatt_db_register(device->db, NULL, NULL, NULL, NULL);
+
 	attio_cleanup(device);
 
 	gatt_db_unref(device->db);