From dad65c0a7d7ee7c090ae5d3c30409678adaa8cee Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 25 Aug 2005 12:18:01 +0000 Subject: [PATCH] - don't copy the refcount of the passed in value -- fixes remaining mem-leaks of the statics hack --- missing.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/missing.c b/missing.c index fea611c..3e7dbfa 100644 --- a/missing.c +++ b/missing.c @@ -38,7 +38,6 @@ static inline zval *tmp_zval(void) static void dup_zval(zval **z) { - zval *o = *z; zval_add_ref(z); SEPARATE_ZVAL(z); } @@ -141,8 +140,7 @@ int zend_update_static_property(zend_class_entry *scope, char *name, size_t name zval_copy_ctor(*property); } } else { - **property = *value; - zval_copy_ctor(*property); + REPLACE_ZVAL_VALUE(property, value, 1); } retval = SUCCESS; } -- 2.30.2