Ayesha wanted to buy a slave girl in order to set her free, but her owners said, "We will sell her to you on the condition that her right of guardianship remains with us." Ayesha mentioned this to the Messenger of Allah ﷺ, and he said, "Do not let that stop you, for the right of guardianship belongs to the one who sets the slave free."
حدثنا قتيبة بن سعيد قال قرئ على مالك وأنا حاضر قال مالك عرض علي نافع عن ابن عمر أن
أرادت أن تشتري جارية تعتقها فقال أهلها نبيعكها على أن ولاءها لنا فذكرت عائشة ذاك لرسول الله ﷺ فقال لا يمنعك ذلك فإن الولاء لمن أعتق
Bukhari transmitted it in the Book of Sales, Chapter "If Conditions Are Stipulated in a Sale That Are Not Permissible," hadith no. 2169, and Muslim in the Book of Manumission, Chapter "Explanation That the Right of Inheritance (Wala) Belongs to the One Who Frees," hadith no. 1504, both from the hadith of Malik through this chain. It is also found in Muwatta (narration of Yahya) 2/781.