mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(heap): reset alloc_stat before realloc lookup
Closes https://github.com/espressif/esp-idf/issues/18723 Closes https://github.com/espressif/esp-idf/pull/18724
This commit is contained in:
@@ -343,6 +343,7 @@ HEAP_IRAM_ATTR void heap_caps_update_per_task_info_realloc(heap_t *heap, void *o
|
||||
|
||||
/* remove the alloc from the list. The updated alloc stats are added later
|
||||
* in the function */
|
||||
alloc_stat = NULL;
|
||||
STAILQ_FOREACH(alloc_stat, &heap_stats->allocs_stats, next_alloc_stat) {
|
||||
if (alloc_stat->alloc_stat.address == old_ptr) {
|
||||
STAILQ_REMOVE(&heap_stats->allocs_stats, alloc_stat, alloc_stats, next_alloc_stat);
|
||||
|
||||
Reference in New Issue
Block a user