Sahih al-Bukhari — Laws of Inheritance (Al-Faraa'id) — Hadith No: 6748
Translation
Narrated Ibn `Umar:A man and his wife had a case of Lian (or Mula'ana) during the lifetime of the Prophet (ﷺ) and the man denied the paternity of her child. The Prophet (ﷺ) gave his verdict for their separation (divorce) and then the child was regarded as belonging to the wife only