Re: maint@20974 or before broke mp2 ithreads test
Marcus Holland-Moritz [Wed, 3 Sep 2003 08:57:25 +0000 (10:57 +0200)]
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;