Sayyiduna Suwayd bin Muqarrin (may Allah be pleased with him) said: We, the Banu Muqarrin, were seven brothers in the time of the Messenger of Allah (peace and blessings be upon him), and we had only one female servant; we had no servant other than her. One of us slapped her, so the Prophet (peace and blessings be upon him) said: "Free her." I said: O Messenger of Allah, we have no servant other than her. The Prophet (peace and blessings be upon him) said: "Let her serve you until you no longer need her, then set her free."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6418