File tree Expand file tree Collapse file tree 1 file changed +17
-19
lines changed
Expand file tree Collapse file tree 1 file changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -217,27 +217,25 @@ void zend_close_rsrc_list(HashTable *ht)
217217 /* Reload ht->arData on each iteration, as it may be reallocated. */
218218 uint32_t i = ht -> nNumUsed ;
219219
220- while (1 ) {
221- zend_try {
222- while (i -- > 0 ) {
223- zval * p = ZEND_HASH_ELEMENT (ht , i );
224- if (Z_TYPE_P (p ) != IS_UNDEF ) {
225- zend_resource * res = Z_PTR_P (p );
226- if (res -> type >= 0 ) {
227- zend_resource_dtor (res );
228- }
220+ retry :
221+ zend_try {
222+ while (i -- > 0 ) {
223+ zval * p = ZEND_HASH_ELEMENT (ht , i );
224+ if (Z_TYPE_P (p ) != IS_UNDEF ) {
225+ zend_resource * res = Z_PTR_P (p );
226+ if (res -> type >= 0 ) {
227+ zend_resource_dtor (res );
229228 }
230229 }
231- } zend_catch {
232- /* If we have bailed, we probably executed user code (e.g. user stream
233- * API). Keep closing resources so they don't leak. User handlers must be
234- * called now so they aren't called in zend_deactivate() on
235- * zend_destroy_rsrc_list(&EG(regular_list)). At that point, the executor
236- * has already shut down and the process would crash. */
237- continue ;
238- } zend_end_try ();
239- break ;
240- }
230+ }
231+ } zend_catch {
232+ /* If we have bailed, we probably executed user code (e.g. user stream
233+ * API). Keep closing resources so they don't leak. User handlers must be
234+ * called now so they aren't called in zend_deactivate() on
235+ * zend_destroy_rsrc_list(&EG(regular_list)). At that point, the executor
236+ * has already shut down and the process would crash. */
237+ goto retry ;
238+ } zend_end_try ();
241239}
242240
243241
You can’t perform that action at this time.
0 commit comments