rem: while (iterator->cur_dir) module_leave_dir(iterator);
add: while ((path = iterator_pop_path_from_stack(iterator)) != NULL) free((void *)path);   if (iterator->module_image != NULL) put_module_image(iterator->module_image);  if (iterator->current_dir != NULL) closedir(iterator->current_dir);  free(iterator->path_stack); free((void *)iterator->current_path); free((void *)iterator->current_module_path);
context: close_module_list(void *cookie){	module_iterator *iterator = (module_iterator *)cookie;	TRACE(("close_module_list()\n"));	if (iterator == NULL)		return B_BAD_VALUE;	while (iterator->cur_dir)		module_leave_dir(iterator);	free(iterator->prefix);	free(iterator);	return 0;}