diff options
author | Paul Johnson <paul@pjcj.net> | 2003-01-28 15:13:09 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-01-28 21:07:08 +0000 |
commit | cfa2c302336c76d17e447d69dc3aba37b84f1595 (patch) | |
tree | 2a95ff9ad91e943baa71bde893dd4c11cce7e4c2 /op.c | |
parent | 836995da690e86dfede4be5cd8215cfceaeda197 (diff) | |
download | perl-cfa2c302336c76d17e447d69dc3aba37b84f1595.tar.gz |
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" <paul@pjcj.net>
Message-ID: <18918.193.134.254.145.1043759589.squirrel@wesley.pjcj.net>
p4raw-id: //depot/perl@18599
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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: |