This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: maint@20974 or before broke mp2 ithreads test
authorMarcus Holland-Moritz <mhx-perl@gmx.net>
Wed, 3 Sep 2003 08:57:25 +0000 (10:57 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 3 Sep 2003 06:16:24 +0000 (06:16 +0000)
Message-ID: <29644.1062572245@www50.gmx.net>

The other half of #20930 should be still good.

p4raw-id: //depot/perl@21014

op.c

diff --git a/op.c b/op.c
index b10eb81..a69b515 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4350,6 +4350,9 @@ Perl_newCONSTSUB(pTHX_ HV *stash, char *name, SV *sv)
     CvCONST_on(cv);
     sv_setpv((SV*)cv, "");  /* prototype is "" */
 
+    if (stash)
+       CopSTASH_free(PL_curcop);
+
     LEAVE;
 
     return cv;