Set heap size to 0 when heap allocation fails
This commit is contained in:
parent
c1b6c367ff
commit
09d1c846c4
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user