From c53f1caa29d8829011cc4dd8948bd9947d957fba Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Tue, 15 Apr 2008 16:09:11 +0200 Subject: [PATCH] invalid cop_free of nullified cop. How to fix? From: "Reini Urban" Message-ID: <6910a60804150509j3c100fc4t2ed303ae0124ba15@mail.gmail.com> p4raw-id: //depot/perl@33687 --- op.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/op.c b/op.c index 21aa23d..6823cc9 100644 --- a/op.c +++ b/op.c @@ -495,8 +495,6 @@ Perl_op_free(pTHX_ OP *o) op_free(kid); } } - if (type == OP_NULL) - type = (OPCODE)o->op_targ; #ifdef PERL_DEBUG_READONLY_OPS Slab_to_rw(o); @@ -508,6 +506,9 @@ Perl_op_free(pTHX_ OP *o) cop_free((COP*)o); } + if (type == OP_NULL) + type = (OPCODE)o->op_targ; + op_clear(o); if (o->op_latefree) { o->op_latefreed = 1; -- 2.7.4