summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-06-02 18:22:06 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-06-02 18:22:06 +0000
commitf4dd75d9918abbf789a5eca453b89168cad18ff0 (patch)
treec0348eda98b997c301b76ab702c0c93d888d87f5 /toke.c
parent4ebbc97598d793d933009eab4334e3bc88b8de4e (diff)
downloadperl-f4dd75d9918abbf789a5eca453b89168cad18ff0.tar.gz
fix small eval"" memory leaks under USE_ITHREADS
p4raw-id: //depot/perl@6194
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index 99c993e8fa..70a7f537c0 100644
--- a/toke.c
+++ b/toke.c
@@ -502,8 +502,14 @@ S_incline(pTHX_ char *s)
ch = *t;
*t = '\0';
- if (t - s > 0)
+ if (t - s > 0) {
+#ifdef USE_ITHREADS
+ Safefree(CopFILE(PL_curcop));
+#else
+ SvREFCNT_dec(CopFILEGV(PL_curcop));
+#endif
CopFILE_set(PL_curcop, s);
+ }
*t = ch;
CopLINE_set(PL_curcop, atoi(n)-1);
}
@@ -2946,8 +2952,7 @@ Perl_yylex(pTHX)
PL_expect = XTERM;
TOKEN('(');
case ';':
- if (CopLINE(PL_curcop) < PL_copline)
- PL_copline = CopLINE(PL_curcop);
+ CLINE;
tmp = *s++;
OPERATOR(tmp);
case ')':