From 8f87374a52a9ddb9cc9d57ac854383795ad5c859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 28 Jan 2025 11:24:41 +0100 Subject: [PATCH] zend_object_handlers: Use `zend_array_release()` in `zend_release_properties()` and `zend_free_trampoline()` --- Zend/zend_object_handlers.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Zend/zend_object_handlers.h b/Zend/zend_object_handlers.h index 2fc59d5020c25..1f2580a5adcaa 100644 --- a/Zend/zend_object_handlers.h +++ b/Zend/zend_object_handlers.h @@ -333,15 +333,14 @@ ZEND_API zend_function *zend_get_property_hook_trampoline( ZEND_API bool ZEND_FASTCALL zend_asymmetric_property_has_set_access(const zend_property_info *prop_info); #define zend_release_properties(ht) do { \ - if ((ht) && !(GC_FLAGS(ht) & GC_IMMUTABLE) && !GC_DELREF(ht)) { \ - zend_array_destroy(ht); \ + if (ht) { \ + zend_array_release(ht); \ } \ } while (0) #define zend_free_trampoline(func) do { \ - HashTable *attributes = (func)->common.attributes; \ - if (attributes && !(GC_FLAGS(attributes) & GC_IMMUTABLE) && !GC_DELREF(attributes)) { \ - zend_array_destroy(attributes); \ + if ((func)->common.attributes) { \ + zend_array_release((func)->common.attributes); \ } \ if ((func) == &EG(trampoline)) { \ EG(trampoline).common.attributes = NULL; \