Skip to content

Commit

Permalink
as/scanner.l: fix memory leak in error condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tcort committed Sep 18, 2014
1 parent a82e86e commit 1675b33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions as/scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ int main(int argc, char *argv[]) {
yyin = fopen(argv[optind], "r");
if (!yyin) {
perror(argv[optind]);
hash_free(symtab);
symtab = NULL;
exit(1);
}
yyparse();
Expand Down

0 comments on commit 1675b33

Please sign in to comment.