Skip to content

Commit 9241ca4

Browse files
authored
zend_object_handlers: Use zend_array_release() in zend_release_properties() and zend_free_trampoline() (#17608)
1 parent 286030d commit 9241ca4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Zend/zend_object_handlers.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,15 +333,14 @@ ZEND_API zend_function *zend_get_property_hook_trampoline(
333333
ZEND_API bool ZEND_FASTCALL zend_asymmetric_property_has_set_access(const zend_property_info *prop_info);
334334

335335
#define zend_release_properties(ht) do { \
336-
if ((ht) && !(GC_FLAGS(ht) & GC_IMMUTABLE) && !GC_DELREF(ht)) { \
337-
zend_array_destroy(ht); \
336+
if (ht) { \
337+
zend_array_release(ht); \
338338
} \
339339
} while (0)
340340

341341
#define zend_free_trampoline(func) do { \
342-
HashTable *attributes = (func)->common.attributes; \
343-
if (attributes && !(GC_FLAGS(attributes) & GC_IMMUTABLE) && !GC_DELREF(attributes)) { \
344-
zend_array_destroy(attributes); \
342+
if ((func)->common.attributes) { \
343+
zend_array_release((func)->common.attributes); \
345344
} \
346345
if ((func) == &EG(trampoline)) { \
347346
EG(trampoline).common.attributes = NULL; \

0 commit comments

Comments
 (0)