summaryrefslogtreecommitdiff
path: root/ext/spl/php_spl.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/php_spl.c')
-rw-r--r--ext/spl/php_spl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index 35b6e549f2..238b7574a0 100644
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -573,7 +573,7 @@ PHP_FUNCTION(spl_autoload_register)
if (obj_ptr && !(alfi.func_ptr->common.fn_flags & ZEND_ACC_STATIC)) {
/* add object id to the hash to ensure uniqueness, for more reference look at bug #40091 */
- STR_EREALLOC(lc_name, lc_name->len + 2 + sizeof(zend_uint));
+ STR_REALLOC(lc_name, lc_name->len + 2 + sizeof(zend_uint), 0);
memcpy(lc_name->val + lc_name->len - 2 - sizeof(zend_uint), &Z_OBJ_HANDLE_P(obj_ptr), sizeof(zend_uint));
lc_name->val[lc_name->len] = '\0';
alfi.obj = obj_ptr;
@@ -685,7 +685,7 @@ PHP_FUNCTION(spl_autoload_unregister)
/* remove specific */
success = zend_hash_del(SPL_G(autoload_functions), lc_name);
if (success != SUCCESS && obj_ptr) {
- STR_EREALLOC(lc_name, lc_name->len + 2 + sizeof(zend_uint));
+ STR_REALLOC(lc_name, lc_name->len + 2 + sizeof(zend_uint), 0);
memcpy(lc_name->val + lc_name->len - 2 - sizeof(zend_uint), &Z_OBJ_HANDLE_P(obj_ptr), sizeof(zend_uint));
lc_name->val[lc_name->len] = '\0';
success = zend_hash_del(SPL_G(autoload_functions), lc_name);