I remember when there were seven of us brothers and we had only one servant girl. One of us slapped her, so the Prophet ﷺ commanded us to set her free.
حدثنا أبو كريب حدثنا المحاربي عن شعبة عن حصين عن هلال بن يساف
لقد رأيتنا سبعة إخوة ما لنا خادم إلا واحدة فلطمها أحدنا فأمرنا النبي ﷺ أن نعتقها
Muslim also narrated it in the Book of Oaths, in the chapter on treatment of slaves and the atonement for someone who slaps his slave, hadith no. 1658, from the hadith of Shubah with this same wording. On this subject there is also a narration from Ibn Umar [Muslim, hadith no. 1657].