aboutsummaryrefslogtreecommitdiffstats
path: root/rcfile_y.y
diff options
context:
space:
mode:
Diffstat (limited to 'rcfile_y.y')
-rw-r--r--rcfile_y.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/rcfile_y.y b/rcfile_y.y
index b32a6b0c..91de6146 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -490,7 +490,8 @@ int prc_parse_file (const char *pathname, const flag securecheck)
yyparse(); /* parse entire file */
- fclose(yyin); /* not checking this should be safe, file mode was r */
+ if (yyin != stdin)
+ fclose(yyin); /* not checking this should be safe, file mode was r */
if (prc_errflag)
return(PS_SYNTAX);