]> granicus.if.org Git - php/commitdiff
Fixed bug #19943 (the memleaks)
authorfoobar <sniper@php.net>
Thu, 6 Mar 2003 16:27:05 +0000 (16:27 +0000)
committerfoobar <sniper@php.net>
Thu, 6 Mar 2003 16:27:05 +0000 (16:27 +0000)
Zend/zend_execute.c

index e6a9b16779c5ab553e799b2dba0a849136df0592..46897d0967b219d6ed06a520388ba00792bd15db 100644 (file)
@@ -367,6 +367,7 @@ static inline void zend_assign_to_object_op(znode *result, znode *op1, znode *op
        if (object->type != IS_OBJECT) {
                zend_error(E_WARNING, "Attempt to assign property of non-object");
                FREE_OP(Ts, op2, EG(free_op2));
+
                *retval = EG(uninitialized_zval_ptr);
 
                SELECTIVE_PZVAL_LOCK(*retval, result);
@@ -466,9 +467,9 @@ static inline void zend_assign_to_variable(znode *result, znode *op1, znode *op2
 
                                                T->EA.data.str_offset.str->value.str.val[T->EA.data.str_offset.offset] = final_value->value.str.val[0];
                                                if (op2
-                                                       && op2->op_type == IS_VAR
-                                                       && value==&T(op2->u.var).tmp_var) {
-                                                       STR_FREE(value->value.str.val);
+                                                       && op2->op_type != IS_VAR
+                                                       && final_value == &T(op2->u.var).tmp_var) {
+                                                       STR_FREE(final_value->value.str.val);       
                                                }
                                                if (final_value == &tmp) {
                                                        zval_dtor(final_value);