summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-11-23 14:19:52 +0000
committerDavid Mitchell <davem@iabyn.com>2012-06-13 13:32:45 +0100
commit9fe3265f80780ae89bff15514f96265eaac469d9 (patch)
tree647748b0a4310750c5d5a60bcee59902ebf3c818 /pp_ctl.c
parent6b65ee8dd7e74f4f4b67ad25535ec2e6987f4ac5 (diff)
downloadperl-9fe3265f80780ae89bff15514f96265eaac469d9.tar.gz
pp_regcomp(): fix refcnt issue with qr_anoncv
Assigning to qr_anoncv was introduced a few commits ago, but I forgot to increase the reference count
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 1e23a7a3c8..24a0d3e5d0 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -118,7 +118,7 @@ PP(pp_regcomp)
(pm->op_pmflags & (RXf_PMf_COMPILETIME|PMf_HAS_CV)));
if (pm->op_pmflags & PMf_HAS_CV)
((struct regexp *)SvANY(new_re))->qr_anoncv
- = (CV*) PAD_SV(PL_op->op_targ);
+ = (CV*) SvREFCNT_inc(PAD_SV(PL_op->op_targ));
if (is_bare_re) {
REGEXP *tmp;