summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 713c4a469b..49c9c53df3 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -61,17 +61,23 @@ ZEND_API int zval_dtor(zval *zvalue)
ELS_FETCH();
if (zvalue->value.ht && (zvalue->value.ht != &EG(symbol_table))) {
+#ifdef USE_AI_COUNT
if (EG(AiCount)==0) {
zend_hash_destroy(zvalue->value.ht);
efree(zvalue->value.ht);
} else {
zend_ptr_stack_push(&EG(garbage), zvalue->value.ht);
}
+#else
+ zend_hash_destroy(zvalue->value.ht);
+ efree(zvalue->value.ht);
+#endif
}
}
break;
case IS_OBJECT: {
- ELS_FETCH();
+#ifdef USE_AI_COUNT
+ ELS_FETCH();
if (EG(AiCount)==0) {
zend_hash_destroy(zvalue->value.obj.properties);
@@ -79,6 +85,10 @@ ZEND_API int zval_dtor(zval *zvalue)
} else {
zend_ptr_stack_push(&EG(garbage), zvalue->value.obj.properties);
}
+#else
+ zend_hash_destroy(zvalue->value.obj.properties);
+ efree(zvalue->value.obj.properties);
+#endif
}
break;
case IS_RESOURCE: