diff options
-rw-r--r-- | ext/XS-APItest/APItest.xs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 8c045bcf45..1d2f6f3fdf 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -3445,7 +3445,8 @@ lexical_import(SV *name, CV *cv) SAVESPTR(PL_comppad_name); PL_comppad_name = PadlistNAMES(pl); SAVESPTR(PL_comppad); PL_comppad = PadlistARRAY(pl)[1]; SAVESPTR(PL_curpad); PL_curpad = PadARRAY(PL_comppad); - off = pad_add_name_sv(newSVpvf("&%"SVf,name), padadd_STATE, 0, 0); + off = pad_add_name_sv(sv_2mortal(newSVpvf("&%"SVf,name)), + padadd_STATE, 0, 0); SvREFCNT_dec(PL_curpad[off]); PL_curpad[off] = SvREFCNT_inc(cv); LEAVE; |