If a syntax error occurs while parsing a loaded symbol file, the souce file is closed twice, once by popfin(called from yyerror) and the other by an explicit myfclose in loadsymfile(). Since a parse error can cause multiple yyerror invocations, prevent popfin from both freeing Infile and closing Fin multiple times by setting Fin to NULL after its closed.
At same time check if yyparse failed and skip the explicit close call.
If a syntax error occurs while parsing a loaded symbol file, the souce file is closed twice, once by popfin(called from yyerror) and the other by an explicit myfclose in loadsymfile(). Since a parse error can cause multiple yyerror invocations, prevent popfin from both freeing Infile and closing Fin multiple times by setting Fin to NULL after its closed. At same time check if yyparse failed and skip the explicit close call.