summaryrefslogtreecommitdiff
path: root/Zend/zend_constants.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-05-08 17:30:15 +0300
committerDmitry Stogov <dmitry@zend.com>2018-05-08 17:30:15 +0300
commit524f5245c55223d36d1166554ca894fa77ea2dd1 (patch)
treeaa7e6e9fa7f37afe6cd4b9a3c8ce8d919cd2f15d /Zend/zend_constants.c
parent9565075cbd57f226c77745f5e7c915635680784c (diff)
downloadphp-git-524f5245c55223d36d1166554ca894fa77ea2dd1.tar.gz
Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string.
Diffstat (limited to 'Zend/zend_constants.c')
-rw-r--r--Zend/zend_constants.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c
index a2e25c89df..b07901c470 100644
--- a/Zend/zend_constants.c
+++ b/Zend/zend_constants.c
@@ -226,7 +226,7 @@ static zend_constant *zend_get_special_constant(const char *name, size_t name_le
haltname = zend_mangle_property_name(haltoff,
sizeof("__COMPILER_HALT_OFFSET__") - 1, cfilename, clen, 0);
c = zend_hash_find_ptr(EG(zend_constants), haltname);
- zend_string_free(haltname);
+ zend_string_efree(haltname);
return c;
} else {
return NULL;
@@ -379,7 +379,7 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
}
failure:
zend_string_release(class_name);
- zend_string_free(constant_name);
+ zend_string_efree(constant_name);
return ret_constant;
}