mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
core-system/linux-target: fixed heap_caps_realloc not correctly allocating the requested number of bytes
Closes https://github.com/espressif/esp-idf/issues/11523
This commit is contained in:
parent
7121ec0f63
commit
5b77f77e53
@ -80,7 +80,7 @@ void *heap_caps_malloc_prefer( size_t size, size_t num, ... )
|
||||
|
||||
static void *heap_caps_realloc_base( void *ptr, size_t size, uint32_t caps)
|
||||
{
|
||||
ptr = realloc(ptr, caps);
|
||||
ptr = realloc(ptr, size);
|
||||
|
||||
if (ptr == NULL && size > 0) {
|
||||
heap_caps_alloc_failed(size, caps, __func__);
|
||||
|
Loading…
Reference in New Issue
Block a user