From 09d1c846c4a72c1e6a2d72657c58c2abe55984cf Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 13 Jul 2022 13:53:22 -0500 Subject: [PATCH] Set heap size to 0 when heap allocation fails --- ports/espressif/supervisor/port.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 0169f5ce16..78c3508458 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -235,6 +235,7 @@ safe_mode_t port_init(void) { heap_size = HEAP_SIZE / sizeof(uint32_t); } if (heap == NULL) { + heap_size = 0; return NO_HEAP; }