summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-18 02:08:01 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-18 02:08:01 +0000
commitb0a484d2bfe866f41e22a982ca9f2013ae9c3848 (patch)
treed93485c3af0aca92f95976a8993f43ec0a8f20bb /gv.c
parentf6aaf50100351be0339a4acf484db91a3c02a9ca (diff)
downloadperl-b0a484d2bfe866f41e22a982ca9f2013ae9c3848.tar.gz
fix another CvMUTEXP() leak
p4raw-id: //depot/perl@1526
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 505f6339e5..4adce49408 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) {