=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/bc/scan.l,v retrieving revision 1.19 retrieving revision 1.20 diff -c -r1.19 -r1.20 *** src/usr.bin/bc/scan.l 2005/12/03 18:23:47 1.19 --- src/usr.bin/bc/scan.l 2006/01/24 19:38:44 1.20 *************** *** 1,5 **** %{ ! /* $OpenBSD: scan.l,v 1.19 2005/12/03 18:23:47 deraadt Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek --- 1,5 ---- %{ ! /* $OpenBSD: scan.l,v 1.20 2006/01/24 19:38:44 otto Exp $ */ /* * Copyright (c) 2003, Otto Moerbeek *************** *** 18,24 **** */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: scan.l,v 1.19 2005/12/03 18:23:47 deraadt Exp $"; #endif /* not lint */ #include --- 18,24 ---- */ #ifndef lint ! static const char rcsid[] = "$OpenBSD: scan.l,v 1.20 2006/01/24 19:38:44 otto Exp $"; #endif /* not lint */ #include *************** *** 265,270 **** --- 265,272 ---- free(cmdexpr); state++; } + if (yyin != NULL && yyin != stdin) + fclose(yyin); if (fileindex < sargc) { filename = sargv[fileindex++]; yyin = fopen(filename, "r");