Skip to content

Commit 0ed4f8e

Browse files
committed
Add missing call to GC_ADDREF() for function attribute hash table
This is required to correctly free the hash table in a later commit.
1 parent 7d6b961 commit 0ed4f8e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Zend/zend_compile.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,12 @@ ZEND_API void function_add_ref(zend_function *function) /* {{{ */
10471047

10481048
ZEND_MAP_PTR_INIT(op_array->run_time_cache, NULL);
10491049
ZEND_MAP_PTR_INIT(op_array->static_variables_ptr, NULL);
1050+
} else {
1051+
ZEND_ASSERT(function->type == ZEND_INTERNAL_FUNCTION);
1052+
1053+
if (function->common.attributes) {
1054+
GC_ADDREF(function->common.attributes);
1055+
}
10501056
}
10511057

10521058
if (function->common.function_name) {

0 commit comments

Comments
 (0)