Skip to content

Commit f5cd55a

Browse files
committed
Fix building with ESP_ABORT_ON_MALLOC_FAILURE
1 parent 0d4c008 commit f5cd55a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

platforms/esp8266/src/esp_libc.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@ void *realloc(void *ptr, size_t size) {
7171
esp_check_stack_overflow(3, (int) size, ptr);
7272
res = (void *) umm_realloc(ptr, size);
7373
#ifdef ESP_ABORT_ON_MALLOC_FAILURE
74-
if (res == NULL) {
75-
printf("failed to alloc %u bytes, %d avail\n", size,
76-
system_get_free_heap_size());
77-
abort();
78-
}
74+
if (res == NULL) abort();
7975
#endif
8076
esp_check_stack_overflow(4, (int) size, res);
8177
return res;

0 commit comments

Comments
 (0)