summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>1999-04-13 19:28:03 +0000
committerAndi Gutmans <andi@php.net>1999-04-13 19:28:03 +0000
commite1e2226b926cf52c7d3d99ec7aeb3924983ceedc (patch)
treee703c6173e22a56ab04f4a01ab09c4e127c2e5aa /Zend/zend_compile.c
parentd86ed8207ccf73de6ba316d9a345dc1dbc705541 (diff)
downloadphp-git-e1e2226b926cf52c7d3d99ec7aeb3924983ceedc.tar.gz
- Fix various memory leaks.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 5d16f370c1..d1e4a92088 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -937,12 +937,17 @@ void do_brk_cont(int op, znode *expr CLS_DC)
void do_switch_cond(znode *cond CLS_DC)
{
zend_switch_entry switch_entry;
+ zend_op *opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1];
switch_entry.cond = *cond;
switch_entry.default_case = -1;
switch_entry.control_var = -1;
zend_stack_push(&CG(switch_cond_stack), (void *) &switch_entry, sizeof(switch_entry));
+ if (opline->result.op_type == IS_VAR) {
+ opline->result.u.EA.type |= EXT_TYPE_UNUSED;
+ }
+
do_begin_loop(CLS_C);
INC_BPC(CG(active_op_array));