It was narrated that Jabir said:
"A man from among the Ansar came to the Prophet (ﷺ) and said: 'O Messenger of Allah (ﷺ), I have a slave girl. Should I do 'Azl (coitus interruptus) with her?' He said 'Whatever is decreed for her shall come to her." He (the Ansari) came to him later on and said: "The slave girl has become pregnant." The Prophet (ﷺ) said: "Nothing is decreed for a person but it will surely come to pass."
English reference: Vol. 1, Book 1, Hadith 89
Arabic reference: Book 1, Hadith 94