summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-01-16 02:21:27 +0300
committerDmitry Stogov <dmitry@zend.com>2015-01-16 02:21:27 +0300
commitb46894d1048d4003f197af0f6de883b2930da89f (patch)
tree66d4a5c9a68f86547a613da8f415d0073c5d1ca6
parent1c5e9146169cea55796749ff223e5670f2d509bd (diff)
downloadphp-git-b46894d1048d4003f197af0f6de883b2930da89f.tar.gz
Partially revert 3477135cd1024c897dc070c37ddae411839b6e7e
-rw-r--r--Zend/zend_object_handlers.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 251ac310d5..c77754fe46 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -1044,7 +1044,9 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str
}
if (UNEXPECTED((func = zend_hash_find(&zobj->ce->function_table, lc_method_name)) == NULL)) {
- STR_ALLOCA_FREE(lc_method_name, use_heap);
+ if (UNEXPECTED(!key)) {
+ STR_ALLOCA_FREE(lc_method_name, use_heap);
+ }
if (zobj->ce->__call) {
return zend_get_user_call_function(zobj->ce, method_name);
} else {
@@ -1099,7 +1101,9 @@ static union _zend_function *zend_std_get_method(zend_object **obj_ptr, zend_str
}
}
- STR_ALLOCA_FREE(lc_method_name, use_heap);
+ if (UNEXPECTED(!key)) {
+ STR_ALLOCA_FREE(lc_method_name, use_heap);
+ }
return fbc;
}
/* }}} */