It is permissible to have intercourse with a female captive after it is established that she is not pregnant, and if she has a husband, then her marriage is annulled when she is captured Sahih Muslim 1456 b

Show Arabic text
Translation
Abu Sa'id al-Khudri (Allah be pleased with him) reported that Allah's Apostle (ﷺ) sent a small army. The rest of the hadith is the same except this that he said

Except what your right hands possess out of them are lawful for you; and he did not mention" when their 'idda period comes to an end".