summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-07 23:25:46 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-03-07 23:25:46 +0000
commit01724ea0117e95cb2b727cb7055bec7a17087b2c (patch)
tree7f121bf97845c8ef29857d0ff1281f33c0fcedf5 /perl.c
parent51486eaa98de10b06be50ff33c1a20f1b0d4abfb (diff)
downloadperl-01724ea0117e95cb2b727cb7055bec7a17087b2c.tar.gz
CopFILEGV(&PL_compiling) must be reset properly (from Doug MacEachern)
p4raw-id: //depot/perl@5604
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 601c7bebeb..2dbfc8e193 100644
--- a/perl.c
+++ b/perl.c
@@ -591,6 +591,10 @@ perl_destruct(pTHXx)
if (!specialWARN(PL_compiling.cop_warnings))
SvREFCNT_dec(PL_compiling.cop_warnings);
PL_compiling.cop_warnings = Nullsv;
+#ifndef USE_ITHREADS
+ SvREFCNT_dec(CopFILEGV(&PL_compiling));
+ CopFILEGV_set(&PL_compiling, Nullgv);
+#endif
/* Prepare to destruct main symbol table. */
@@ -675,10 +679,15 @@ perl_destruct(pTHXx)
SvREFCNT(&PL_sv_yes) = 0;
sv_clear(&PL_sv_yes);
SvANY(&PL_sv_yes) = NULL;
+ SvREADONLY_off(&PL_sv_yes);
SvREFCNT(&PL_sv_no) = 0;
sv_clear(&PL_sv_no);
SvANY(&PL_sv_no) = NULL;
+ SvREADONLY_off(&PL_sv_no);
+
+ SvREFCNT(&PL_sv_undef) = 0;
+ SvREADONLY_off(&PL_sv_undef);
if (PL_sv_count != 0 && ckWARN_d(WARN_INTERNAL))
Perl_warner(aTHX_ WARN_INTERNAL,"Scalars leaked: %ld\n", (long)PL_sv_count);