diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 02:08:01 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 02:08:01 +0000 |
commit | b0a484d2bfe866f41e22a982ca9f2013ae9c3848 (patch) | |
tree | d93485c3af0aca92f95976a8993f43ec0a8f20bb /gv.c | |
parent | f6aaf50100351be0339a4acf484db91a3c02a9ca (diff) | |
download | perl-b0a484d2bfe866f41e22a982ca9f2013ae9c3848.tar.gz |
fix another CvMUTEXP() leak
p4raw-id: //depot/perl@1526
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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) { |