From 1675b33c14e75585f87d643266e2413a50d93780 Mon Sep 17 00:00:00 2001 From: Thomas Cort Date: Wed, 17 Sep 2014 20:35:48 -0400 Subject: [PATCH] as/scanner.l: fix memory leak in error condition --- as/scanner.l | 2 ++ 1 file changed, 2 insertions(+) diff --git a/as/scanner.l b/as/scanner.l index f2e22b7..16ff6e6 100644 --- a/as/scanner.l +++ b/as/scanner.l @@ -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();