summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2018-08-16 11:21:34 -0700
committerGitHub <noreply@github.com>2018-08-16 11:21:34 -0700
commit92ed5d7bf223212e8db04af3f6712770ec2c86ea (patch)
tree20745a9cfc6b593aa7bb7bb339fa79c1378bbf66
parent5f08ebdfc80ecc40260240ac5fb4ed72aafc6381 (diff)
parente72cebbad65c054ac3bb03a12d6c1102a78c834f (diff)
Merge pull request #1119 from tannewt/memory_free_fix
Fix crash due to unsigned index and 0 boundary loop.
-rwxr-xr-xsupervisor/shared/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c
index 34c5dfb6f..6c8be3be8 100755
--- a/supervisor/shared/memory.c
+++ b/supervisor/shared/memory.c
@@ -43,7 +43,7 @@ void memory_init(void) {
}
void free_memory(supervisor_allocation* allocation) {
- uint8_t index = 0;
+ int32_t index = 0;
bool found = false;
for (index = 0; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {
found = allocation == &allocations[index];