Free the defines memory earlier.
There is no need to keep this memory for the life of the program.
This commit is contained in:
parent
c80d6974cb
commit
d152751cf8
2 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue