diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2006-12-29 00:08:35 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-12-29 00:08:35 +0000 |
commit | 7e5d8ed22a9e0983529873e07602c1b147b8b5b8 (patch) | |
tree | 4c7e2c13fcea923635ea9c6d9fbb45471e33ba95 /op.c | |
parent | 44a10c71f5d5adc63a15c1d8fb5e8b72de48836f (diff) | |
download | perl-7e5d8ed22a9e0983529873e07602c1b147b8b5b8.tar.gz |
further fix for #29543: fix parser leaks caused by croaking
p4raw-id: //depot/perl@29636
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2726,6 +2726,7 @@ Perl_newOP(pTHX_ I32 type, I32 flags) o->op_flags = (U8)flags; o->op_latefree = 0; o->op_latefreed = 0; + o->op_attached = 0; o->op_next = o; o->op_private = (U8)(0 | (flags >> 8)); @@ -5323,6 +5324,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) if (CvLVALUE(cv)) { CvROOT(cv) = newUNOP(OP_LEAVESUBLV, 0, mod(scalarseq(block), OP_LEAVESUBLV)); + block->op_attached = 1; } else { /* This makes sub {}; work as expected. */ @@ -5335,6 +5337,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) #endif block = newblock; } + else + block->op_attached = 1; CvROOT(cv) = newUNOP(OP_LEAVESUB, 0, scalarseq(block)); } CvROOT(cv)->op_private |= OPpREFCOUNTED; |