summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index 819e0b6abf..276ebbb556 100644
--- a/toke.c
+++ b/toke.c
@@ -385,6 +385,8 @@ register char *s;
PerlIO_clearerr(rsfp);
else
(void)PerlIO_close(rsfp);
+ if (e_fp == rsfp)
+ e_fp = Nullfp;
rsfp = Nullfp;
return s;
}
@@ -1545,6 +1547,8 @@ yylex()
PerlIO_clearerr(rsfp);
else
(void)PerlIO_close(rsfp);
+ if (e_fp == rsfp)
+ e_fp = Nullfp;
rsfp = Nullfp;
}
if (!in_eval && (minus_n || minus_p)) {