The child is to be given to the lady (accused by her husband).
باب يَلْحَقُ الْوَلَدُ بِالْمُلاَعِنَةِ
Sahih al-Bukhari, Book of Divorce(view book)
Sahih al-Bukhari 5315
Narrated Ibn 'Umar: The Prophet made a man and his wife carry out Lian, and the husband repudiated her child. So the Prophet got them separated (by divorce) and decided that the child belonged to the mother only.
حَدَّثَنَا يَحْيَى بْنُ بُكَيْرٍ، حَدَّثَنَا مَالِكٌ، قَالَ حَدَّثَنِي نَافِعٌ، عَنِ ابْنِ عُمَرَ، أَنَّ النَّبِيَّ ﷺ لاَعَنَ بَيْنَ رَجُلٍ وَامْرَأَتِهِ، فَانْتَفَى مِنْ وَلَدِهَا فَفَرَّقَ بَيْنَهُمَا، وَأَلْحَقَ الْوَلَدَ بِالْمَرْأَةِ.
Classification
Sahih (Authentic)