Iterator has to be properly closed

This commit is contained in:
Dmitry Stogov 2014-03-20 23:05:38 +04:00
parent a9d21c1457
commit 24b72415cb

View File

@ -208,6 +208,10 @@ static void zend_generator_free_storage(zend_object *object TSRMLS_DC) /* {{{ */
zend_object_std_dtor(&generator->std TSRMLS_CC);
if (generator->iterator.std.handle) {
zend_iterator_dtor(&generator->iterator TSRMLS_CC);
}
GC_REMOVE_FROM_BUFFER(generator);
efree(generator);
}