Commit:    e00b04a54fd94c1ecffcf6931d2d7518126f1ea6
Author:    Dmitry Stogov <dmi...@zend.com>         Sat, 16 Mar 2013 17:24:54 
+0400
Parents:   e9641141aaad136757af06fddd6d870147ac2000
Branches:  PHP-5.5 master

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=e00b04a54fd94c1ecffcf6931d2d7518126f1ea6

Log:
Fixed memory leaks

Changed paths:
  M  ext/opcache/Optimizer/block_pass.c


Diff:
diff --git a/ext/opcache/Optimizer/block_pass.c 
b/ext/opcache/Optimizer/block_pass.c
index 3d4bb0c..d4299c8 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1304,9 +1304,11 @@ static void zend_jmp_optimization(zend_code_block 
*block, zend_op_array *op_arra
                                        /* JMP L, L: JMP L1 -> JMP L1 */
                                        /* JMP L, L: JMPZNZ L1,L2 -> JMPZNZ 
L1,L2 */
                                        *last_op = *target;
+#if ZEND_EXTENSION_API_NO < PHP_5_4_X_API_NO
                                        if (ZEND_OP1_TYPE(last_op) == IS_CONST) 
{
                                                
zval_copy_ctor(&ZEND_OP1_LITERAL(last_op));
                                        }
+#endif
                                        del_source(block, block->op1_to);
                                        if (block->op1_to->op2_to) {
                                                block->op2_to = 
block->op1_to->op2_to;
@@ -1332,9 +1334,11 @@ static void zend_jmp_optimization(zend_code_block 
*block, zend_op_array *op_arra
                                      target->opcode == ZEND_EXIT) {
                                        /* JMP L, L: RETURN to immediate RETURN 
*/
                                        *last_op = *target;
+#if ZEND_EXTENSION_API_NO < PHP_5_4_X_API_NO
                                        if (ZEND_OP1_TYPE(last_op) == IS_CONST) 
{
                                                
zval_copy_ctor(&ZEND_OP1_LITERAL(last_op));
                                        }
+#endif
                                        del_source(block, block->op1_to);
                                        block->op1_to = NULL;
 #if 0


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to