Skip to content

Commit 09d1c84

Browse files
committed
Set heap size to 0 when heap allocation fails
1 parent c1b6c36 commit 09d1c84

File tree

1 file changed

+1
-0
lines changed
  • ports/espressif/supervisor

1 file changed

+1
-0
lines changed

ports/espressif/supervisor/port.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ safe_mode_t port_init(void) {
235235
heap_size = HEAP_SIZE / sizeof(uint32_t);
236236
}
237237
if (heap == NULL) {
238+
heap_size = 0;
238239
return NO_HEAP;
239240
}
240241

0 commit comments

Comments
 (0)