File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_
8787 return ;
8888 }
8989
90- /* Free object contents, but don't free objects themselves, so they show up as leaks */
90+ /* Free object contents, but don't free objects themselves, so they show up as leaks.
91+ * Also add a ref to all objects, so the object can't be freed by something else later. */
9192 end = objects -> object_buckets + 1 ;
9293 obj_ptr = objects -> object_buckets + objects -> top ;
9394
@@ -101,7 +102,6 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_
101102 if (obj -> handlers -> free_obj != zend_object_std_dtor ) {
102103 GC_ADDREF (obj );
103104 obj -> handlers -> free_obj (obj );
104- GC_DELREF (obj );
105105 }
106106 }
107107 }
@@ -115,7 +115,6 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_
115115 GC_ADD_FLAGS (obj , IS_OBJ_FREE_CALLED );
116116 GC_ADDREF (obj );
117117 obj -> handlers -> free_obj (obj );
118- GC_DELREF (obj );
119118 }
120119 }
121120 } while (obj_ptr != end );
You can’t perform that action at this time.
0 commit comments