diff --git a/first-interpreter/src/execute.c b/first-interpreter/src/execute.c index 2a0b74d..9a3a722 100644 --- a/first-interpreter/src/execute.c +++ b/first-interpreter/src/execute.c @@ -153,7 +153,7 @@ Scope interpret_stmt(Stmt stmt, Memory memory, Scope scope) { Stmt current = ((Stmt*)stmt.data.While.block.elements)[i]; new_scope = interpret_stmt(current, memory, new_scope); } - // free pointers before they leak + // free the part of the scope we are done with struct Cell* next = new_scope.next; while (next != NULL && next != scope.next) { struct Cell* nextnext = next->next;