This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca556bc
)
[perl #40388] perl_destruct() leaks PL_main_cv
author
David Mitchell
<davem@iabyn.com>
Sun, 19 Sep 2010 11:49:07 +0000
(12:49 +0100)
committer
David Mitchell
<davem@iabyn.com>
Mon, 20 Sep 2010 07:16:12 +0000
(08:16 +0100)
Well yes, it does, kinda; but it's harmless. Add a comment to that effect.
perl.c
patch
|
blob
|
blame
|
history
diff --git
a/perl.c
b/perl.c
index
860cdfc
..
79e87a5
100644
(file)
--- 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;