We went out with the Messenger of Allah ﷺ on the expedition against Banu Mustaliq and captured some Arab prisoners. We desired the women, as celibacy had become difficult for us, and we also wanted the ransom money. So we decided to practice withdrawal, but then we said, "Should we practice withdrawal while the Messenger of Allah ﷺ is among us, before asking him about it?"We asked him about this, and he said, "It does not matter if you do not do so. There is no soul destined to come into being until the Day of Resurrection that will not come into being."
خرجنا مع رسول الله ﷺ في غزوة بني المصطلق، فأصبنا سبيا من سبي العرب، فاشتهينا النساء، واشتدت علينا العزبة، وأحببنا الفداء، فأردنا أن نعزل، فقلنا: نعزل ورسول الله ﷺ بين أظهرنا قبل أن نسأله، فسألناه عن ذلك، فقال: ما عليكم أن لا تفعلوا ما من نسمة كائنة إلى يوم القيامة إلا وهي كائنة.
Malik narrated it in "Divorce" (95) from Rabia bin Abu Abdul-Rahman, from Muhammad bin Yahya bin Habban, from Ibn Muhayriz, who said, "I entered the masjid and saw Abu Saeed Khudri, so I sat next to him and asked him about coitus interruptus." Abu Saeed Khudri then mentioned it.Bukhari narrated it in "Manumission" (2542), and Muslim in "Marriage" (1438:127), both through the route of Malik with the same wording. Muslim's version is abridged, and neither of them mentioned the opening story.