From: Paul Johnson Date: Tue, 28 Jan 2003 14:13:09 +0000 (+0100) Subject: Fix a very small memory leak in op_free, by reserving the X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cfa2c302336c76d17e447d69dc3aba37b84f1595;p=p5sagit%2Fp5-mst-13.2.git Fix a very small memory leak in op_free, by reserving the case op_seq == (U16)-1 for the compiler backend Subject: Re: Freeing code From: "Paul Johnson" Message-ID: <18918.193.134.254.145.1043759589.squirrel@wesley.pjcj.net> p4raw-id: //depot/perl@18599 --- diff --git a/op.c b/op.c index f693dfc..41bc9d0 100644 --- a/op.c +++ b/op.c @@ -6063,8 +6063,10 @@ Perl_peep(pTHX_ register OP *o) for (; o; o = o->op_next) { if (o->op_seq) break; - if (!PL_op_seqmax) - PL_op_seqmax++; + /* The special value -1 is used by the B::C compiler backend to indicate + * that an op is statically defined and should not be freed */ + if (!PL_op_seqmax || PL_op_seqmax == (U16)-1) + PL_op_seqmax = 1; PL_op = o; switch (o->op_type) { case OP_SETSTATE: