Call yylex_destroy() to free memory after yyparse()

This commit is contained in:
Homer Hsing 2012-09-06 15:55:54 +08:00 committed by Damien Lespiau
parent 302ca73198
commit 31401afe78
2 changed files with 3 additions and 0 deletions

View File

@ -180,6 +180,7 @@ void insert_register(struct declared_register *reg);
int yyparse(void);
int yylex(void);
int yylex_destroy(void);
char *
lex_text(void);

View File

@ -275,6 +275,8 @@ int main(int argc, char **argv)
err = yyparse();
yylex_destroy();
if (yyin)
fclose(yyin);