From: Reini Urban Date: Tue, 15 Apr 2008 14:09:11 +0000 (+0200) Subject: invalid cop_free of nullified cop. How to fix? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c53f1caa29d8829011cc4dd8948bd9947d957fba;p=p5sagit%2Fp5-mst-13.2.git invalid cop_free of nullified cop. How to fix? From: "Reini Urban" Message-ID: <6910a60804150509j3c100fc4t2ed303ae0124ba15@mail.gmail.com> p4raw-id: //depot/perl@33687 --- 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;