Add todo for handling improper free.

This commit is contained in:
Scott Shawcroft 2018-08-02 14:45:21 -07:00
parent 5704bc8c93
commit 4b247eacd8
No known key found for this signature in database
GPG Key ID: FD0EDC4B6C53CA59

View File

@ -51,6 +51,10 @@ void free_memory(supervisor_allocation* allocation) {
break; break;
} }
} }
if (!found) {
// Bad!
// TODO(tannewt): Add a way to escape into safe mode on error.
}
if (allocation->ptr == high_address) { if (allocation->ptr == high_address) {
high_address += allocation->length / 4; high_address += allocation->length / 4;
for (index++; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) { for (index++; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {