]> granicus.if.org Git - php/commitdiff
MFH: fix leak and improve CS a bit
authorAntony Dovgal <tony2001@php.net>
Tue, 28 Jun 2005 22:04:52 +0000 (22:04 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 28 Jun 2005 22:04:52 +0000 (22:04 +0000)
Zend/zend_execute.c

index ad31ad63b1f1e9aeb9d231f8dd950904bf287102..3397eb0a5dc43e70fede9eff001584f0d1ef8625 100644 (file)
@@ -2944,11 +2944,9 @@ return_by_value:
                        zend_error(E_STRICT, "Implicit cloning object of class '%s' because of 'zend.ze1_compatibility_mode'", class_name);
                        (*EG(return_value_ptr_ptr))->value.obj = Z_OBJ_HT_P(retval_ptr)->clone_obj(retval_ptr TSRMLS_CC);
 
-                       if(dup)
-                       {
+                       if(dup == SUCCESS) {
                           efree(class_name);
                        }
-
                } else if (!EG(free_op1)) { /* Not a temp var */
                        if (EG(active_op_array)->return_reference == ZEND_RETURN_REF ||
                            (PZVAL_IS_REF(retval_ptr) && retval_ptr->refcount > 0)) {