DEBUG_LEAKING_SCALARS could use the value of a freed PL_op
Dave Mitchell [Tue, 19 Apr 2005 23:31:52 +0000 (23:31 +0000)]
p4raw-id: //depot/perl@24255

op.c

diff --git a/op.c b/op.c
index a226aad..8264232 100644 (file)
--- a/op.c
+++ b/op.c
@@ -313,6 +313,10 @@ Perl_op_free(pTHX_ OP *o)
 
     op_clear(o);
     FreeOp(o);
+#ifdef DEBUG_LEAKING_SCALARS
+    if (PL_op == o)
+       PL_op = Nullop;
+#endif
 }
 
 void