Handle memory leak in callout deinit

This commit is contained in:
Rahul Tank
2024-03-07 11:18:16 +05:30
parent 3fd01d5092
commit 91141f2588
+1 -3
View File
@@ -784,11 +784,10 @@ 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);
ble_npl_event_deinit(&callout->ev);
#endif
#if OS_MEM_ALLOC
os_memblock_put(&ble_freertos_co_pool,callout);
@@ -796,7 +795,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));
}