From 4b247eacd85ba79d6fbb72d217dc5a13e85a5ed9 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 2 Aug 2018 14:45:21 -0700 Subject: [PATCH] Add todo for handling improper free. --- supervisor/shared/memory.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 051f55a70e..34c5dfb6f8 100755 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -51,6 +51,10 @@ void free_memory(supervisor_allocation* allocation) { break; } } + if (!found) { + // Bad! + // TODO(tannewt): Add a way to escape into safe mode on error. + } if (allocation->ptr == high_address) { high_address += allocation->length / 4; for (index++; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {