forked from espressif/esp-idf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
esp_timer: fix for the case when timer is deleted in callback
Timer callback can delete the timer. If CONFIG_ESP_TIMER_PROFILING was enabled, this caused an access to invalid (freed) memory. This fix adds a pointer to track the timer while executing the callback. This is needed so that we can check if callback deletes the timer, in which case we won't try updating profiling counters for this timer after the callback is done.
- Loading branch information
Showing
2 changed files
with
50 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters