A man asked the Prophet ﷺ, "Messenger of Allah, what removes from me the obligation owed for nursing?"He replied, "A male or female slave."
حدثنا قتيبة حدثنا حاتم بن إسمعيل عن هشام بن عروة عن أبيه
أنه سأل النبي ﷺ فقال يا رسول الله ما يذهب عني مذمة الرضاع فقال غرة عبد أو أمة
[Its chain is hasan] Abu Dawud narrated it in the Book of Marriage, Chapter on giving a gift at weaning, no. 2064, and Nasai in 6/108, no. 3331, from the hadith of Hisham with the same wording, and Ibn Hibban graded it sahih, no. 1253, 1254. The hadith has many corroborating narrations (Majma al-Zawaid, 4/262) and elsewhere.