Merge branch 'fix/heap-calloc-fail-wrong-size_v5.0' into 'release/v5.0'

fix(heap): Wrong size propagated in alloc fail callback of heap_caps_calloc() (backport v5.0)

See merge request espressif/esp-idf!30092
This commit is contained in:
Marius Vikhammer 2024-04-09 12:05:15 +08:00
commit 19304c5769

View File

@ -488,7 +488,7 @@ IRAM_ATTR void *heap_caps_calloc( size_t n, size_t size, uint32_t caps)
void* ptr = heap_caps_calloc_base(n, size, caps);
if (!ptr && size > 0){
heap_caps_alloc_failed(size, caps, __func__);
heap_caps_alloc_failed(n * size, caps, __func__);
}
return ptr;