summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-03-26 21:24:03 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-03-26 21:24:03 -0700
commitb9a9477585a3dd606f2df4969dd2aa59aff5d5a7 (patch)
tree5c00e4399bfee6a8d2adbae2f28503f4d9b7f100
parentd03ce4f5412fd49bf3d119e68c5e987e3221dacf (diff)
downloadperl-smoke-me/leaked-heks-111462.tar.gz
Stop finalize_optree errors from leaking op treesmoke-me/leaked-heks-111462
Full commit message to come later....
-rw-r--r--op.c3
1 files changed, 3 insertions, 0 deletions
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