mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-01 23:57:54 +00:00
Handle memory leak in callout deinit
This commit is contained in:
committed by
Abhinav Kudnar
parent
c100086bde
commit
02ef2e088f
@@ -808,10 +808,9 @@ npl_freertos_callout_deinit(struct ble_npl_callout *co)
|
||||
|
||||
if(esp_timer_delete(callout->handle))
|
||||
ESP_LOGW(TAG, "Timer not deleted");
|
||||
|
||||
#else
|
||||
|
||||
xTimerDelete(callout->handle, portMAX_DELAY);
|
||||
#endif
|
||||
|
||||
#if OS_MEM_ALLOC
|
||||
os_memblock_put(&ble_freertos_co_pool,callout);
|
||||
@@ -819,7 +818,6 @@ npl_freertos_callout_deinit(struct ble_npl_callout *co)
|
||||
free((void *)callout);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
co->co = NULL;
|
||||
memset(co, 0, sizeof(struct ble_npl_callout));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user