Skip to content

Commit

Permalink
free loopstack
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasMW committed Oct 5, 2016
1 parent e210694 commit a6448c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ void execute(char* program)
Stack* loopStack;
char instructions[] = {'>','<','+','-','.',',','[',']'};
char* ptr;
char c,*cp;
int i;
char c;
char *loopStart = NULL;
int internalLoopCount = 0;
char* memory = (char*) calloc(sizeof(char),DEFAULT_SIZE); // memory of program must be zeroed.
Expand Down Expand Up @@ -158,6 +157,7 @@ void execute(char* program)
program++;
}
free(memory);
free(loopStack);
}

int errorMessage(int argc, char** argv)
Expand Down

0 comments on commit a6448c6

Please sign in to comment.