summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorPaul Johnson <paul@pjcj.net>2003-01-28 15:13:09 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2003-01-28 21:07:08 +0000
commitcfa2c302336c76d17e447d69dc3aba37b84f1595 (patch)
tree2a95ff9ad91e943baa71bde893dd4c11cce7e4c2 /op.c
parent836995da690e86dfede4be5cd8215cfceaeda197 (diff)
downloadperl-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/op.c b/op.c
index f693dfc4b8..41bc9d0a46 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: