summaryrefslogtreecommitdiff
path: root/Zend/zend_closures.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-09-02 14:20:01 +0300
committerDmitry Stogov <dmitry@zend.com>2019-09-02 14:20:01 +0300
commit33e10fe1cbcee80754f52fbd419c45fa559478b1 (patch)
treeb71ff2adf3efe53b10fe89b99413d88655584453 /Zend/zend_closures.c
parent633c5886bc250f45613858e67e21f528cf844ed5 (diff)
parentc739023a50876e2a90588f915803b0140a95638e (diff)
downloadphp-git-33e10fe1cbcee80754f52fbd419c45fa559478b1.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Free two bits in fn_flags by merging ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO and ZEND_ACC_DONE_PASS_TWO/ZEND_ACC_ARENA_ALLOCATED that may be used only for user/internal functions
Diffstat (limited to 'Zend/zend_closures.c')
-rw-r--r--Zend/zend_closures.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index ed2a61ec6a..d6cb6abc7a 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -179,7 +179,8 @@ ZEND_METHOD(Closure, call)
if (fci_cache.function_handler->common.fn_flags & ZEND_ACC_GENERATOR) {
/* copied upon generator creation */
GC_DELREF(&closure->std);
- } else if (fci_cache.function_handler->common.fn_flags & ZEND_ACC_HEAP_RT_CACHE) {
+ } else if (ZEND_USER_CODE(my_function.type)
+ && fci_cache.function_handler->common.fn_flags & ZEND_ACC_HEAP_RT_CACHE) {
efree(ZEND_MAP_PTR(my_function.op_array.run_time_cache));
}
}