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:
8731c5d
)
Remove small memory leak in newATTRSUB that manifested as a
author
Dave Mitchell
<davem@fdisolutions.com>
Sun, 25 Jan 2004 02:04:23 +0000
(
02:04
+0000)
committer
Dave Mitchell
<davem@fdisolutions.com>
Sun, 25 Jan 2004 02:04:23 +0000
(
02:04
+0000)
leaking scalar after the interpeter was cloned
p4raw-id: //depot/perl@22209
op.c
patch
|
blob
|
blame
|
history
diff --git
a/op.c
b/op.c
index
b902fed
..
5fd21bf
100644
(file)
--- a/
op.c
+++ b/
op.c
@@
-4165,6
+4165,8
@@
Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
/* transfer PL_compcv to cv */
cv_undef(cv);
CvFLAGS(cv) = CvFLAGS(PL_compcv);
+ if (!CvWEAKOUTSIDE(cv))
+ SvREFCNT_dec(CvOUTSIDE(cv));
CvOUTSIDE(cv) = CvOUTSIDE(PL_compcv);
CvOUTSIDE_SEQ(cv) = CvOUTSIDE_SEQ(PL_compcv);
CvOUTSIDE(PL_compcv) = 0;