Extend newSVpvn_flags() to also call sv_2mortal() if SVs_TEMP is set in
[p5sagit/p5-mst-13.2.git] / mro.c
diff --git a/mro.c b/mro.c
index f4014a8..9c57b79 100644 (file)
--- a/mro.c
+++ b/mro.c
@@ -1049,7 +1049,7 @@ XS(XS_mro_nextcan)
     /* beyond here is just for cache misses, so perf isn't as critical */
 
     stashname_len = subname - fq_subname - 2;
-    stashname = sv_2mortal(newSVpvn(fq_subname, stashname_len));
+    stashname = newSVpvn_flags(fq_subname, stashname_len, SVs_TEMP);
 
     linear_av = mro_get_linear_isa_c3(selfstash, 0); /* has ourselves at the top of the list */