Re: [perl #32949] FileCache only works in "main" package
[p5sagit/p5-mst-13.2.git] / pad.c
diff --git a/pad.c b/pad.c
index f1d15ab..0c00cff 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -1410,7 +1410,9 @@ Perl_cv_clone(pTHX_ CV *proto)
 #endif
     CvGV(cv)           = CvGV(proto);
     CvSTASH(cv)                = CvSTASH(proto);
+    OP_REFCNT_LOCK;
     CvROOT(cv)         = OpREFCNT_inc(CvROOT(proto));
+    OP_REFCNT_UNLOCK;
     CvSTART(cv)                = CvSTART(proto);
     CvOUTSIDE(cv)      = (CV*)SvREFCNT_inc(outside);
     CvOUTSIDE_SEQ(cv) = CvOUTSIDE_SEQ(proto);