summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2003-04-26 21:43:32 +0000
committerArtur Bergman <sky@nanisky.com>2003-04-26 21:43:32 +0000
commitd8f2cf8a73241e835478961923f08341719a76ab (patch)
treec1fb89d4b6cae18341809f17aa5ed34540a68c30 /pp_hot.c
parent73b5735c85106e9c6a58cea663a53d49569a9bdd (diff)
downloadperl-d8f2cf8a73241e835478961923f08341719a76ab.tar.gz
Fix bug #15161 by increasing the refcount on the RE and making
sure to restore it correctly. Deals with both s//e and s///g. p4raw-id: //depot/perl@19342
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/pp_hot.c b/pp_hot.c
index b74000715e..c6a533b326 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2161,6 +2161,7 @@ PP(pp_subst)
if (!c) {
register PERL_CONTEXT *cx;
SPAGAIN;
+ ReREFCNT_inc(rx);
PUSHSUBST(cx);
RETURNOP(cPMOP->op_pmreplroot);
}