Ayesha wanted to buy a Jariya in order to set her free, but the Jariya's owners said, "We will sell her to you on the condition that the right of guardianship remains with us."She mentioned this to the Messenger of Allah ﷺ, who said, "Do not let that stop you, for the right of guardianship belongs to the one who sets the slave free."
أخبرنا قتيبة بن سعيد عن مالك عن نافع
أن عائشة أرادت أن تشتري جارية تعتقها فقال أهلها نبيعكها على أن الولاء لنا فذكرت ذلك لرسول الله ﷺ فقال لا يمنعك ذلك فإن الولاء لمن أعتق
Bukhari reported it in the Book of Sales, Chapter "When conditions are stipulated in a sale that are not permissible," hadith no. 2169, and Muslim in the Book of Manumission, Chapter "Explaining that the right of wala belongs to the one who frees the slave," hadith no. 1504, both from the hadith of Malik with this chain. It is also found in the Muwatta (Yahya's recension, 2/781), and in Al-Kubra, hadith no. 6240.