mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-01 15:47:54 +00:00
fixed memory leak for ble_hs_flow_timer and ble_hs_stop_terminate_tmo
This commit is contained in:
committed by
Wang Mengyang
parent
8869cf6ba6
commit
554cd264cd
@@ -830,4 +830,8 @@ ble_hs_deinit(void)
|
||||
ble_gap_deinit();
|
||||
|
||||
ble_hs_hci_deinit();
|
||||
|
||||
ble_hs_flow_stop();
|
||||
|
||||
ble_hs_stop_deinit();
|
||||
}
|
||||
|
||||
@@ -273,3 +273,11 @@ ble_hs_flow_startup(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ble_hs_flow_stop(void)
|
||||
{
|
||||
#if MYNEWT_VAL(BLE_HS_FLOW_CTRL)
|
||||
ble_npl_callout_deinit(&ble_hs_flow_timer);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
void ble_hs_flow_connection_broken(uint16_t conn_handle);
|
||||
void ble_hs_flow_track_data_mbuf(struct os_mbuf *om);
|
||||
int ble_hs_flow_startup(void);
|
||||
|
||||
void ble_hs_flow_stop(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -132,6 +132,7 @@ void ble_hs_timer_resched(void);
|
||||
void ble_hs_notifications_sched(void);
|
||||
struct ble_npl_eventq *ble_hs_evq_get(void);
|
||||
void ble_hs_stop_init(void);
|
||||
void ble_hs_stop_deinit(void);
|
||||
|
||||
struct ble_mqueue {
|
||||
STAILQ_HEAD(, os_mbuf_pkthdr) head;
|
||||
|
||||
@@ -281,3 +281,9 @@ ble_hs_stop_init(void)
|
||||
ble_hs_stop_terminate_timeout_cb, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
ble_hs_stop_deinit(void)
|
||||
{
|
||||
ble_npl_callout_deinit(&ble_hs_stop_terminate_tmo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user