diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2021-03-18 10:14:32 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-03-18 10:31:28 +0100 |
commit | 234af00bcb93e0be1d9b17ab3f2d366b09a99611 (patch) | |
tree | 49fc5fe3a23f38bae2104936d480a46c8618a1ba /Zend/zend_objects_API.c | |
parent | 7e9f6d2a48f8ff6ae458252d395eec1b1d9e6f14 (diff) | |
download | php-git-234af00bcb93e0be1d9b17ab3f2d366b09a99611.tar.gz |
Destroy constant values before object store
Now that constants can contain objects (currently only enums),
we should destroy them before we free the object store, otherwise
there will be false positive leak reports.
This doesn't affect the fast_shutdown sequence.
Diffstat (limited to 'Zend/zend_objects_API.c')
-rw-r--r-- | Zend/zend_objects_API.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Zend/zend_objects_API.c b/Zend/zend_objects_API.c index b0e9d2f8a8..104cda6141 100644 --- a/Zend/zend_objects_API.c +++ b/Zend/zend_objects_API.c @@ -113,10 +113,7 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_ if (IS_OBJ_VALID(obj)) { if (!(OBJ_FLAGS(obj) & IS_OBJ_FREE_CALLED)) { GC_ADD_FLAGS(obj, IS_OBJ_FREE_CALLED); - // FIXME: This causes constant objects to leak - if (!(obj->ce->ce_flags & ZEND_ACC_ENUM)) { - GC_ADDREF(obj); - } + GC_ADDREF(obj); obj->handlers->free_obj(obj); } } |