This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add a new macro SvPV_free() which undoes OOK and free()s the PVX(),
[perl5.git] / pp_ctl.c
index 2db8d7e..783a59a 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -240,9 +240,7 @@ PP(pp_substcont)
            } else
 #endif
            {
-               SvOOK_off(targ);
-               if (SvLEN(targ))
-                   Safefree(SvPVX(targ));
+               SvPV_free(targ);
            }
            SvPV_set(targ, SvPVX(dstr));
            SvCUR_set(targ, SvCUR(dstr));