From b9a9477585a3dd606f2df4969dd2aa59aff5d5a7 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 26 Mar 2012 21:24:03 -0700 Subject: Stop finalize_optree errors from leaking op tree Full commit message to come later.... --- op.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/op.c b/op.c index 2ffe10fa23..86ec54ed80 100644 --- a/op.c +++ b/op.c @@ -1496,14 +1496,17 @@ the tree thread-safe. void Perl_finalize_optree(pTHX_ OP* o) { + I32 i = PL_savestack_ix; PERL_ARGS_ASSERT_FINALIZE_OPTREE; + if (o != PL_main_root) SAVEFREEOP(o); ENTER; SAVEVPTR(PL_curcop); finalize_op(o); LEAVE; + PL_savestack_ix = i; } STATIC void -- cgit v1.2.1