summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-10-31 15:41:51 +0300
committerDmitry Stogov <dmitry@zend.com>2017-10-31 15:41:51 +0300
commitb84cbefa940bef25cfb464c2d99f03ebcb611e25 (patch)
tree88083e08431a2abc4ce68a01fa2b43b1dd850825 /Zend/zend_variables.c
parent54ebab96408bd187f0d14237b8bf1885a66d1503 (diff)
downloadphp-git-b84cbefa940bef25cfb464c2d99f03ebcb611e25.tar.gz
Change checks that should be always true into ZEND_ASSERT() (some edge cases may be trapped here).
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 97a2ea474c..1d3d2a66a7 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -34,7 +34,9 @@ ZEND_API void ZEND_FASTCALL _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC
case IS_STRING: {
zend_string *str = (zend_string*)p;
CHECK_ZVAL_STRING_REL(str);
- zend_string_free(str);
+ ZEND_ASSERT(!ZSTR_IS_INTERNED(str));
+ ZEND_ASSERT(GC_REFCOUNT(str) == 0);
+ pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT);
break;
}
case IS_ARRAY: {