summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-09-19 12:49:07 +0100
committerDavid Mitchell <davem@iabyn.com>2010-09-20 08:16:12 +0100
commitaac9d523d6a5c05209364195355a241de1641c93 (patch)
tree5911b74c03741361f1aa57fa4034305b42c20360 /perl.c
parentca556bcdca736b2f85c11650c70b2371169c0225 (diff)
downloadperl-aac9d523d6a5c05209364195355a241de1641c93.tar.gz
[perl #40388] perl_destruct() leaks PL_main_cv
Well yes, it does, kinda; but it's harmless. Add a comment to that effect.
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 860cdfcd2a..79e87a5b64 100644
--- a/perl.c
+++ b/perl.c
@@ -751,6 +751,10 @@ perl_destruct(pTHXx)
PL_main_root = NULL;
}
PL_main_start = NULL;
+ /* note that PL_main_cv isn't usually actually freed at this point,
+ * due to the CvOUTSIDE refs from subs compiled within it. It will
+ * get freed once all the subs are freed in sv_clean_all(), for
+ * destruct_level > 0 */
SvREFCNT_dec(PL_main_cv);
PL_main_cv = NULL;
PL_dirty = TRUE;