From 22f5163f10c4a1f42ac0d46e22d5f1e42e085536 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 16 Mar 2007 19:29:04 +0000 Subject: [PATCH] Under -Dmad, free the ops representing the dead code when a branch conditional value is actually a constant. Previously this was leaking ops, and more visibly shared hash keys. p4raw-id: //depot/perl@30605 --- op.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/op.c b/op.c index 7c649fc..981b765 100644 --- a/op.c +++ b/op.c @@ -4246,12 +4246,12 @@ Perl_newCONDOP(pTHX_ I32 flags, OP *first, OP *trueop, OP *falseop) trueop = newUNOP(OP_NULL, 0, trueop); op_getmad(first,trueop,'C'); op_getmad(falseop,trueop,'e'); - } - /* FIXME for MAD - should there be an ELSE here? */ -#else - op_free(first); - op_free(falseop); + } else #endif + { + op_free(first); + op_free(falseop); + } return trueop; } else { @@ -4260,12 +4260,12 @@ Perl_newCONDOP(pTHX_ I32 flags, OP *first, OP *trueop, OP *falseop) falseop = newUNOP(OP_NULL, 0, falseop); op_getmad(first,falseop,'C'); op_getmad(trueop,falseop,'t'); - } - /* FIXME for MAD - should there be an ELSE here? */ -#else - op_free(first); - op_free(trueop); + } else #endif + { + op_free(first); + op_free(trueop); + } return falseop; } } -- 1.8.3.1