It is narrated from Abdullah bin Umar (may Allah be pleased with them) that Umar bin Khattab (may Allah be pleased with him) said: "What is the matter with people that they have intercourse with their slave women and then practice coitus interruptus (withdrawal)? Now, if any slave woman comes to me and her master admits to having had intercourse with her, I will attribute the (child) to his father. After that, whether you practice coitus interruptus or not, it is up to you."
Hadith Referenceمسند الإمام الشافعي / كتاب عشرة النساء والإيلاء والخلع / 1199
Hadith Takhrijصحيح اخرجه البيهقي : 413/7 - وفى المعرفة السنن والآثار له (3597) وعبدالرزاق: 12523 ، 12522 - وابن ابي شيبة (17491)۔