Skip to content

Commit c889bf1

Browse files
committed
Simplify freeing of function attributes
Use `zend_hash_release()`.
1 parent d15e9f7 commit c889bf1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Zend/zend_opcode.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,7 @@ ZEND_API void zend_function_dtor(zval *zv)
152152
ZEND_ASSERT(function->type == ZEND_INTERNAL_FUNCTION);
153153
ZEND_ASSERT(function->common.function_name);
154154
zend_string_release_ex(function->common.function_name, 1);
155-
156-
if (function->common.attributes) {
157-
zend_hash_destroy(function->common.attributes);
158-
free(function->common.attributes);
159-
function->common.attributes = NULL;
160-
}
155+
zend_hash_release(function->common.attributes);
161156

162157
/* For methods this will be called explicitly. */
163158
if (!function->common.scope) {

0 commit comments

Comments
 (0)