From: Rafael Garcia-Suarez Date: Tue, 15 Apr 2008 15:54:31 +0000 (+0000) Subject: Call cop_free on nullified cops too X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cc93af5fbd42046d3d6e19c3655b76edf6980b42;p=p5sagit%2Fp5-mst-13.2.git Call cop_free on nullified cops too (this is a followup to 33687) p4raw-id: //depot/perl@33695 --- diff --git a/op.c b/op.c index 6823cc9..ba9e2a5 100644 --- a/op.c +++ b/op.c @@ -502,7 +502,10 @@ Perl_op_free(pTHX_ OP *o) /* COP* is not cleared by op_clear() so that we may track line * numbers etc even after null() */ - if (type == OP_NEXTSTATE || type == OP_DBSTATE) { + if (type == OP_NEXTSTATE || type == OP_DBSTATE + || (type == OP_NULL /* the COP might have been null'ed */ + && ((OPCODE)o->op_targ == OP_NEXTSTATE + || (OPCODE)o->op_targ == OP_DBSTATE))) { cop_free((COP*)o); }