‘They made an end’ – it doesn't mean they executed them; it means they processed all the offenders, and made judgements against them, and the divorces were arranged with whatever compassionate terms. Ezra doesn't mention that either here or in the final verse of the chapter how it was done all the arrangements; he makes no mention of the consideration given to the wives or children.