Skip to content

Commit

Permalink
Merge branch 'fix/heap-calloc-fail-wrong-size_v5.1' into 'release/v5.1'
Browse files Browse the repository at this point in the history
fix(heap): Wrong size propagated in alloc fail callback of heap_caps_calloc() (backport v5.1)

See merge request espressif/esp-idf!30091
  • Loading branch information
jack0c committed Apr 11, 2024
2 parents 32c8c58 + 2c794ee commit 9abd010
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/heap/heap_caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ HEAP_IRAM_ATTR void *heap_caps_calloc( size_t n, size_t size, uint32_t caps)


if (!ptr && size > 0){
heap_caps_alloc_failed(size, caps, __func__);
heap_caps_alloc_failed(n * size, caps, __func__);
}

return ptr;
Expand Down

0 comments on commit 9abd010

Please sign in to comment.