1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Use spl_RecursiveIteratorIterator_free_iterators()

This commit is contained in:
Niels Dossche
2024-11-01 20:46:29 +01:00
parent 2b17168ac1
commit aafcf997f9

View File

@@ -655,16 +655,7 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla
intern->iterators[0].getchildren = NULL;
if (EG(exception)) {
// TODO: use spl_RecursiveIteratorIterator_free_iterators
zend_object_iterator *sub_iter;
while (intern->level >= 0) {
sub_iter = intern->iterators[intern->level].iterator;
zend_iterator_dtor(sub_iter);
zval_ptr_dtor(&intern->iterators[intern->level--].zobject);
}
efree(intern->iterators);
intern->iterators = NULL;
spl_RecursiveIteratorIterator_free_iterators(intern);
}
}