p4raw-id: //depot/perl@1526
CvSTASH(GvCV(gv)) = curstash;
#ifdef USE_THREADS
CvOWNER(GvCV(gv)) = 0;
- New(666, CvMUTEXP(GvCV(gv)), 1, perl_mutex);
+ if (!CvMUTEXP(GvCV(gv)))
+ New(666, CvMUTEXP(GvCV(gv)), 1, perl_mutex);
MUTEX_INIT(CvMUTEXP(GvCV(gv)));
#endif /* USE_THREADS */
if (proto) {