diff options
-rw-r--r-- | op.c | 5 | ||||
-rw-r--r-- | regexec.c | 2 | ||||
-rw-r--r-- | sv.c | 3 |
3 files changed, 5 insertions, 5 deletions
@@ -624,7 +624,8 @@ clear_pmop: #ifdef USE_ITHREADS if(PL_regex_pad) { /* We could be in destruction */ ReREFCNT_dec(PM_GETRE(cPMOPo)); - av_push((AV*) PL_regex_pad[0],(SV*) PL_regex_pad[(cPMOPo)->op_pmoffset]); + av_push((AV*) PL_regex_pad[0], + (SV*) SvREFCNT_inc_simple_NN(PL_regex_pad[(cPMOPo)->op_pmoffset])); SvREADONLY_off(PL_regex_pad[(cPMOPo)->op_pmoffset]); SvREPADTMP_on(PL_regex_pad[(cPMOPo)->op_pmoffset]); PM_SETRE_OFFSET(cPMOPo, (cPMOPo)->op_pmoffset); @@ -3373,7 +3374,7 @@ Perl_newPMOP(pTHX_ I32 type, I32 flags) sv_setiv(repointer,0); } else { SV * const repointer = newSViv(0); - av_push(PL_regex_padav, SvREFCNT_inc_simple_NN(repointer)); + av_push(PL_regex_padav, repointer); pmop->op_pmoffset = av_len(PL_regex_padav); PL_regex_pad = AvARRAY(PL_regex_padav); } @@ -2259,7 +2259,7 @@ S_regtry(pTHX_ regmatch_info *reginfo, char **startpos) /* so we know which PL_regex_padav element is PL_reg_curpm when clearing up in perl_destruct() */ SvFLAGS(repointer) |= SVf_BREAK; - av_push(PL_regex_padav,repointer); + av_push(PL_regex_padav,SvREFCNT_inc_simple_NN(repointer)); PL_reg_curpm->op_pmoffset = av_len(PL_regex_padav); PL_regex_pad = AvARRAY(PL_regex_padav); } @@ -11273,8 +11273,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, SV * const sv = SvREPADTMP(regex) ? sv_dup_inc((SV*) regex, param) - : SvREFCNT_inc( - newSViv(PTR2IV(sv_dup_inc(INT2PTR(SV *, SvIVX(regex)), param)))) + : newSViv(PTR2IV(sv_dup_inc(INT2PTR(SV *, SvIVX(regex)), param))) ; if (SvFLAGS(regex) & SVf_BREAK) SvFLAGS(sv) |= SVf_BREAK; /* unrefcnted PL_curpm */ |