summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-04 04:15:59 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-04 04:15:59 +0000
commit612f20c37ac59506501c890e7f9285f551c793d2 (patch)
tree0a5b7c0359483a9ec5cf29ce04f10c0614f5ab88 /perl.c
parentcf36064f875775fbd01f4387ab083483e8fa24f8 (diff)
downloadperl-612f20c37ac59506501c890e7f9285f551c793d2.tar.gz
fix large memory leak that has been around for ever, masked by
-DPURIFY (most of the arenas were never freed!) p4raw-id: //depot/perl@6298
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/perl.c b/perl.c
index eb454b91c1..33ca54061b 100644
--- a/perl.c
+++ b/perl.c
@@ -706,9 +706,6 @@ perl_destruct(pTHXx)
if (PL_sv_count != 0 && ckWARN_d(WARN_INTERNAL))
Perl_warner(aTHX_ WARN_INTERNAL,"Scalars leaked: %ld\n", (long)PL_sv_count);
- sv_free_arenas();
-
- /* No SVs have survived, need to clean out */
Safefree(PL_origfilename);
Safefree(PL_reg_start_tmp);
if (PL_reg_curpm)
@@ -739,6 +736,8 @@ perl_destruct(pTHXx)
PL_thrsv = Nullsv;
#endif /* USE_THREADS */
+ sv_free_arenas();
+
/* As the absolutely last thing, free the non-arena SV for mess() */
if (PL_mess_sv) {