diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2004-01-25 02:04:23 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2004-01-25 02:04:23 +0000 |
commit | 5c41a5fa918d32924e1ac2f02418d5d7f465ef26 (patch) | |
tree | e0f36879109e084ef0f72656ca3203618f6be129 | |
parent | 8731c5d9eb453a5b2d087dabd7a5f51b576b8048 (diff) | |
download | perl-5c41a5fa918d32924e1ac2f02418d5d7f465ef26.tar.gz |
Remove small memory leak in newATTRSUB that manifested as a
leaking scalar after the interpeter was cloned
p4raw-id: //depot/perl@22209
-rw-r--r-- | op.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |