From: Dave Mitchell Date: Sat, 6 Mar 2004 15:25:32 +0000 (+0000) Subject: fix coredump in /(?{sub{}})/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=01773faa9769567ce88d77c5c19bfde6b32b5488;p=p5sagit%2Fp5-mst-13.2.git fix coredump in /(?{sub{}})/ p4raw-id: //depot/perl@22445 --- diff --git a/pad.c b/pad.c index 316833d..f2c7777 100644 --- a/pad.c +++ b/pad.c @@ -257,8 +257,11 @@ Perl_pad_undef(pTHX_ CV* cv) CV *innercv = (CV*)curpad[ix]; namepad[ix] = Nullsv; SvREFCNT_dec(namesv); - curpad[ix] = Nullsv; - SvREFCNT_dec(innercv); + + if (SvREFCNT(comppad) < 2) { /* allow for /(?{ sub{} })/ */ + curpad[ix] = Nullsv; + SvREFCNT_dec(innercv); + } if (SvREFCNT(innercv) /* in use, not just a prototype */ && CvOUTSIDE(innercv) == cv) {