Skip to content

Commit 92ed5d7

Browse files
authored
Merge pull request micropython#1119 from tannewt/memory_free_fix
Fix crash due to unsigned index and 0 boundary loop.
2 parents 5f08ebd + e72cebb commit 92ed5d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

supervisor/shared/memory.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void memory_init(void) {
4343
}
4444

4545
void free_memory(supervisor_allocation* allocation) {
46-
uint8_t index = 0;
46+
int32_t index = 0;
4747
bool found = false;
4848
for (index = 0; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {
4949
found = allocation == &allocations[index];

0 commit comments

Comments
 (0)