summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 526468df81..7837f6409b 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1987,7 +1987,7 @@ PP(pp_subst)
doutf8 = DO_UTF8(dstr);
/* replacement needing upgrading? */
if (DO_UTF8(TARG) && !doutf8) {
- SV *nsv = newSVpvn(c, clen);
+ SV *nsv = sv_2mortal(newSVpvn(c, clen));
if (PL_encoding)
sv_recode_to_utf8(nsv, PL_encoding);
else