mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-09 08:56:11 +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();
|
err = yyparse();
|
||||||
|
|
||||||
yylex_destroy();
|
if (strcmp(argv[0], "-"))
|
||||||
|
|
||||||
if (yyin)
|
|
||||||
fclose(yyin);
|
fclose(yyin);
|
||||||
|
|
||||||
|
yylex_destroy();
|
||||||
|
|
||||||
if (err || errors)
|
if (err || errors)
|
||||||
exit (1);
|
exit (1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user