diff options
| author | Andi Gutmans <andi@php.net> | 1999-04-13 19:28:03 +0000 |
|---|---|---|
| committer | Andi Gutmans <andi@php.net> | 1999-04-13 19:28:03 +0000 |
| commit | e1e2226b926cf52c7d3d99ec7aeb3924983ceedc (patch) | |
| tree | e703c6173e22a56ab04f4a01ab09c4e127c2e5aa /Zend/zend_compile.c | |
| parent | d86ed8207ccf73de6ba316d9a345dc1dbc705541 (diff) | |
| download | php-git-e1e2226b926cf52c7d3d99ec7aeb3924983ceedc.tar.gz | |
- Fix various memory leaks.
Diffstat (limited to 'Zend/zend_compile.c')
| -rw-r--r-- | Zend/zend_compile.c | 5 |
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)); |
