summaryrefslogtreecommitdiffstats
path: root/stack/gatt/gatt_main.c
diff options
context:
space:
mode:
authorChris Manton <cmanton@google.com>2014-02-21 12:36:18 -0800
committerAndre Eisenbach <eisenbach@google.com>2015-03-16 16:51:27 -0700
commit49ada1eb9382ce02a0d81b1a7c3065cccf38d09e (patch)
tree6d32464aa31f3aab3d3a0659d66a7d9619adc5b8 /stack/gatt/gatt_main.c
parentb67820c04a5088d57ce9f7cac14183cecd0f02e7 (diff)
downloadandroid_system_bt-49ada1eb9382ce02a0d81b1a7c3065cccf38d09e.tar.gz
android_system_bt-49ada1eb9382ce02a0d81b1a7c3065cccf38d09e.tar.bz2
android_system_bt-49ada1eb9382ce02a0d81b1a7c3065cccf38d09e.zip
Release GATT resources upon teardown
Diffstat (limited to 'stack/gatt/gatt_main.c')
-rw-r--r--stack/gatt/gatt_main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/stack/gatt/gatt_main.c b/stack/gatt/gatt_main.c
index 54951b2bc..8d75f76c3 100644
--- a/stack/gatt/gatt_main.c
+++ b/stack/gatt/gatt_main.c
@@ -134,6 +134,24 @@ void gatt_init (void)
}
+/*******************************************************************************
+**
+** Function gatt_free
+**
+** Description This function frees resources used by the GATT profile.
+**
+** Returns void
+**
+*******************************************************************************/
+void gatt_free(void)
+{
+ int i;
+ GATT_TRACE_DEBUG0("gatt_free()");
+ for (i = 0; i < GATT_MAX_SR_PROFILES; i++)
+ {
+ gatt_free_hdl_buffer(&gatt_cb.hdl_list[i]);
+ }
+}
/*******************************************************************************
**