summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c3
-rw-r--r--toke.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/op.c b/op.c
index ecefb838e0..a123b58e78 100644
--- a/op.c
+++ b/op.c
@@ -3532,7 +3532,8 @@ newSUB(I32 floor, OP *o, OP *proto, OP *block)
CvSTASH(cv) = curstash;
#ifdef USE_THREADS
CvOWNER(cv) = 0;
- New(666, CvMUTEXP(cv), 1, perl_mutex);
+ if (!CvMUTEXP(cv))
+ New(666, CvMUTEXP(cv), 1, perl_mutex);
MUTEX_INIT(CvMUTEXP(cv));
#endif /* USE_THREADS */
diff --git a/toke.c b/toke.c
index db8775859a..9685fc3e32 100644
--- a/toke.c
+++ b/toke.c
@@ -5967,9 +5967,6 @@ start_subparse(I32 is_format, U32 flags)
av_store(comppad_name, 0, newSVpv("@_", 2));
curpad[0] = (SV*)newAV();
SvPADMY_on(curpad[0]); /* XXX Needed? */
- CvOWNER(compcv) = 0;
- New(666, CvMUTEXP(compcv), 1, perl_mutex);
- MUTEX_INIT(CvMUTEXP(compcv));
#endif /* USE_THREADS */
comppadlist = newAV();