X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=missing.c;h=81d5183f4d376b2abbf182c5062f06d5ff2495a1;hp=3390c75d0de18a55c495bf7eab49de6226778a4c;hb=13197bcea39d3425d021ee9a03e08ae5381ce296;hpb=f045f8949f2deb94530b7bca18f85aaa8d5c7d58 diff --git a/missing.c b/missing.c index 3390c75..81d5183 100644 --- a/missing.c +++ b/missing.c @@ -130,6 +130,7 @@ int zend_update_static_property(zend_class_entry *scope, char *name, size_t name } else if (*property == value) { retval = SUCCESS; } else { + value->refcount++; if (PZVAL_IS_REF(*property)) { zval_dtor(*property); (*property)->type = value->type; @@ -145,11 +146,6 @@ int zend_update_static_property(zend_class_entry *scope, char *name, size_t name retval = SUCCESS; } - if (!value->refcount) { - zval_dtor(value); - FREE_ZVAL(value); - } - EG(scope) = old_scope; return retval;