mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-09 00:46:17 +00:00
close File yyin before calling yylex_destroy
This patch makes sure file handler yyin is closed. yylex_destroy() calls yy_init_globals(), which reset yyin to 0. Therefore if we do not close yyin before yylex_destroy(), yyin will not be closed anymore.
This commit is contained in:
parent
31401afe78
commit
aab7cd5cc5
@ -275,11 +275,11 @@ int main(int argc, char **argv)
|
||||
|
||||
err = yyparse();
|
||||
|
||||
yylex_destroy();
|
||||
|
||||
if (yyin)
|
||||
if (strcmp(argv[0], "-"))
|
||||
fclose(yyin);
|
||||
|
||||
yylex_destroy();
|
||||
|
||||
if (err || errors)
|
||||
exit (1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user