summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/op.c b/op.c
index d9cb1d0b65..aeedab9287 100644
--- a/op.c
+++ b/op.c
@@ -4628,9 +4628,10 @@ Perl_newCONSTSUB(pTHX_ HV *stash, const char *name, SV *sv)
CvCONST_on(cv);
sv_setpvn((SV*)cv, "", 0); /* prototype is "" */
+#ifdef USE_ITHREADS
if (stash)
CopSTASH_free(PL_curcop);
-
+#endif
LEAVE;
return cv;