- Fixed memory leak with this pointer. It was somtimes initialized with refcount
authorAndi Gutmans <andi@php.net>
Wed, 6 Oct 1999 17:45:15 +0000 (17:45 +0000)
committerAndi Gutmans <andi@php.net>
Wed, 6 Oct 1999 17:45:15 +0000 (17:45 +0000)
  of 2 instead of 1.
- Also fixed a place where object.ptr_ptr is set to pointing to a zval* instead
  of zval**. I don't think this is ever used so we might be able to remove it
  altogether.

Zend/zend_execute.c

index 6133ac6babd5e0ebf31ca1125cfe6886737c2f3d..204a8b1f95e9e7c610acaa3bc782beefbc1e1539 100644 (file)
@@ -1492,9 +1492,9 @@ do_fcall_common:
                                        *tmp = *object.ptr;
                                        zendi_zval_copy_ctor(*tmp);
                                                                        object.ptr = tmp;
-                                                                       *object.ptr_ptr = tmp;
+                                                                       object.ptr_ptr = &tmp;
                                        }
-                                       object.ptr->refcount = 1;
+                                       object.ptr->refcount = 0;
                                        object.ptr->is_ref = 1;
                                        }
                                                        *this_ptr = object.ptr;