Free the defines memory earlier.

There is no need to keep this memory for the life of the program.
This commit is contained in:
Payton Turnage 2014-01-12 21:49:17 -05:00
parent c80d6974cb
commit d152751cf8
2 changed files with 2 additions and 1 deletions

View file

@ -72,4 +72,6 @@ void lex(tvm_lexer_t *lexer, char *source, tvm_tree_t **node)
}
lexer->tokens[i] = NULL;
tvm_tree_destroy(*node);
*node = NULL;
}

View file

@ -15,7 +15,6 @@ tvm_program_t *program_create()
void program_destroy(tvm_program_t *p)
{
htab_destroy(p->label_htab);
tvm_tree_destroy(p->defines);
if(p->values)
{