s390/options.c::prune_bad_freespace_segs() needs to use LIST_FOR_EACH_SAFE since it might delete elements from the list during the loop. --- evms-2.3.4a/plugins/s390/options.c 11 Dec 2003 17:48:11 -0000 +++ evms-2.3.4b/plugins/s390/options.c 22 Jun 2004 16:14:03 -0000 @@ -1961,10 +1961,12 @@ lba_t Start; lba_t End; sector_count_t MaxSize; - list_element_t iter; + list_element_t iter1, iter2; boolean prune; - LIST_FOR_EACH( list, iter, seg ) { + LOG_ENTRY(); + + LIST_FOR_EACH_SAFE( list, iter1, iter2, seg ) { prune = TRUE; @@ -2016,9 +2018,10 @@ } - if (prune) EngFncs->delete_element(iter); + if (prune) EngFncs->delete_element(iter1); } + LOG_EXIT_VOID(); }