X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=missing.c;h=81d5183f4d376b2abbf182c5062f06d5ff2495a1;hp=3390c75d0de18a55c495bf7eab49de6226778a4c;hb=04403e78125a72f38fcd145a8dc0809e348e39d3;hpb=e00740ccbf98e53bc1aa4aad31fa76560a32bfa4 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;