diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2006-05-20 14:30:50 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-05-20 14:30:50 +0000 |
commit | cff085c1df60b77b6a2dbefd408f54bb564b8353 (patch) | |
tree | 9345f9af8d25a2bc0ad16284d406dd7f0246c421 | |
parent | a0a8d9d340b642dc325a8f62c6d29670624a4f55 (diff) | |
download | perl-cff085c1df60b77b6a2dbefd408f54bb564b8353.tar.gz |
eval { s/$foo/die/e } leaked a scalar
p4raw-id: //depot/perl@28254
-rw-r--r-- | pp_ctl.c | 1 | ||||
-rw-r--r-- | pp_hot.c | 2 |
2 files changed, 1 insertions, 2 deletions
@@ -245,7 +245,6 @@ PP(pp_substcont) if (DO_UTF8(dstr)) SvUTF8_on(targ); SvPV_set(dstr, NULL); - sv_free(dstr); TAINT_IF(cx->sb_rxtainted & 1); PUSHs(sv_2mortal(newSViv(saviters - 1))); @@ -2297,6 +2297,7 @@ PP(pp_subst) #endif rxtainted |= RX_MATCH_TAINTED(rx); dstr = newSVpvn(m, s-m); + SAVEFREESV(dstr); if (DO_UTF8(TARG)) SvUTF8_on(dstr); PL_curpm = pm; @@ -2353,7 +2354,6 @@ PP(pp_subst) SvLEN_set(TARG, SvLEN(dstr)); doutf8 |= DO_UTF8(dstr); SvPV_set(dstr, NULL); - sv_free(dstr); TAINT_IF(rxtainted & 1); SPAGAIN; |