summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-28 16:27:12 +0300
commit5eb1f92f31cafc48384f9096012f421b37f6d425 (patch)
tree4ed67b92229407e7b5cbab37b96428fe80eb3f94 /Zend/zend_variables.c
parent925f05dd1a35eafa71eb29abb69cdfc31a23a75d (diff)
downloadphp-git-5eb1f92f31cafc48384f9096012f421b37f6d425.tar.gz
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 7f0e818fcc..15df748651 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -72,7 +72,8 @@ static void ZEND_FASTCALL zend_string_destroy(zend_string *str ZEND_FILE_LINE_DC
CHECK_ZVAL_STRING_REL(str);
ZEND_ASSERT(!ZSTR_IS_INTERNED(str));
ZEND_ASSERT(GC_REFCOUNT(str) == 0);
- pefree(str, UNEXPECTED(GC_FLAGS(str) & IS_STR_PERSISTENT));
+ ZEND_ASSERT(!(GC_FLAGS(str) & IS_STR_PERSISTENT));
+ efree(str);
}
static void ZEND_FASTCALL zend_reference_destroy(zend_reference *ref ZEND_FILE_LINE_DC)
@@ -112,7 +113,7 @@ ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC)
switch (Z_TYPE_P(zvalue)) {
case IS_STRING:
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
- zend_string_release(Z_STR_P(zvalue));
+ zend_string_release_ex(Z_STR_P(zvalue), 1);
break;
case IS_ARRAY:
case IS_CONSTANT_AST: