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_
87
87
return ;
88
88
}
89
89
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. */
91
92
end = objects -> object_buckets + 1 ;
92
93
obj_ptr = objects -> object_buckets + objects -> top ;
93
94
@@ -101,7 +102,6 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_
101
102
if (obj -> handlers -> free_obj != zend_object_std_dtor ) {
102
103
GC_ADDREF (obj );
103
104
obj -> handlers -> free_obj (obj );
104
- GC_DELREF (obj );
105
105
}
106
106
}
107
107
}
@@ -115,7 +115,6 @@ ZEND_API void ZEND_FASTCALL zend_objects_store_free_object_storage(zend_objects_
115
115
GC_ADD_FLAGS (obj , IS_OBJ_FREE_CALLED );
116
116
GC_ADDREF (obj );
117
117
obj -> handlers -> free_obj (obj );
118
- GC_DELREF (obj );
119
118
}
120
119
}
121
120
} while (obj_ptr != end );
You can’t perform that action at this time.
0 commit comments