Re: [ID 20010822.001] Freeing pads after parse error
Simon Cozens [Thu, 23 Aug 2001 12:06:36 +0000 (13:06 +0100)]
Message-ID: <20010823120636.A9961@netthink.co.uk>

p4raw-id: //depot/perl@11732

op.c

diff --git a/op.c b/op.c
index 677fe7a..6dcd746 100644 (file)
--- a/op.c
+++ b/op.c
@@ -2147,7 +2147,8 @@ Perl_block_end(pTHX_ I32 floor, OP *seq)
 {
     int needblockscope = PL_hints & HINT_BLOCK_SCOPE;
     OP* retval = scalarseq(seq);
-    LEAVE_SCOPE(floor);
+    if (!PL_error_count)
+        LEAVE_SCOPE(floor);
     PL_pad_reset_pending = FALSE;
     PL_compiling.op_private = PL_hints;
     if (needblockscope)