summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
Diffstat (limited to 'op.c')
-rw-r--r--op.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/op.c b/op.c
index 5ccb73d8f5..1ac27035bb 100644
--- a/op.c
+++ b/op.c
@@ -4273,7 +4273,7 @@ Perl_newCONSTSUB(pTHX_ HV *stash, char *name, SV *sv)
CopSTASH_set(PL_curcop,stash);
}
- cv = newXS(name, const_sv_xsub, CopFILE(PL_curcop));
+ cv = newXS(name, const_sv_xsub, savepv(CopFILE(PL_curcop)));
CvXSUBANY(cv).any_ptr = sv;
CvCONST_on(cv);
sv_setpv((SV*)cv, ""); /* prototype is "" */