(26) باب إِذَا وَهَبَ بَعِيرًا لِرَجُلٍ وَهْوَ رَاكِبُهُ، فَهُوَ جَائِزٌ
Narrated Ibn 'Umar (ra):
We were in the company of the Prophet (ﷺ) on a journey, and I was riding a troublesome camel. The Prophet (ﷺ) asked 'Umar to sell that camel to him. So, 'Umar sold it to him. The Prophet (ﷺ) then said, "O 'Abdullah! The camel is for you."
Reference: Sahih al-Bukhari 2611
In-book reference: Book 51, Hadith 44
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 1, Book 47, Hadith 781