From: Gurusamy Sarathy Date: Sat, 18 Jul 1998 02:08:01 +0000 (+0000) Subject: fix another CvMUTEXP() leak X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0a484d2bfe866f41e22a982ca9f2013ae9c3848;p=p5sagit%2Fp5-mst-13.2.git fix another CvMUTEXP() leak p4raw-id: //depot/perl@1526 --- diff --git a/gv.c b/gv.c index 505f633..4adce49 100644 --- a/gv.c +++ b/gv.c @@ -124,7 +124,8 @@ gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi) 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) {