projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
61b6145
)
avoid leaked scalar in BEGIN { threads->new(...) }
Dave Mitchell [Sun, 15 May 2005 00:09:35 +0000 (
00:09
+0000)]
p4raw-id: //depot/perl@24469
sv.c
patch
|
blob
|
blame
|
history
diff --git
a/sv.c
b/sv.c
index
3d4d5b2
..
06e23ea
100644
(file)
--- a/
sv.c
+++ b/
sv.c
@@
-12425,6
+12425,12
@@
perl_clone_using(PerlInterpreter *proto_perl, UV flags,
SvREFCNT_dec(param->stashes);
+ /* orphaned? eg threads->new inside BEGIN or use */
+ if (PL_compcv && ! SvREFCNT(PL_compcv)) {
+ SvREFCNT_inc(PL_compcv);
+ SAVEFREESV(PL_compcv);
+ }
+
return my_perl;
}