Skip to content

Commit

Permalink
core-system/linux-target: fixed heap_caps_realloc not correctly alloc…
Browse files Browse the repository at this point in the history
…ating the requested number of bytes

Closes #11523
  • Loading branch information
ESP-Marius committed May 30, 2023
1 parent ea5e0ff commit c337759
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/heap/heap_caps_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down

0 comments on commit c337759

Please sign in to comment.