问题描述:
Add btm_free() to clean up btm properly
解决方法:
vendor/qcom/opensource/commonsys/system/bt/stack/btm/btm_int.h
@@ -48,6 +48,7 @@ extern tBTM_CB btm_cb;
*******************************************
*/
extern void btm_init(void);
+extern void btm_free(void);
/* Internal functions provided by btm_inq.cc
******************************************
vendor/qcom/opensource/commonsys/system/bt/stack/btm/btm_main.cc
@@ -87,3 +87,21 @@ void btm_init(void) {
btm_dev_init(); /* Device Manager Structures & HCI_Reset */
}
+
+/** This function is called to free dynamic memory and system resource allocated by btm_init */
+void btm_free(void) {
+ fixed_queue_free(btm_cb.page_queue, NULL);
+ btm_cb.page_queue = NULL;
+
+ fixed_queue_free(btm_cb.sec_pending_q, NULL);
+ btm_cb.sec_pending_q = NULL;
&#