Ibn Umar (may Allah be pleased with him) freed a slave, then picked up a stick from the ground and said: My reward from this is only this much. Then he said: I heard the Messenger of Allah (peace and blessings be upon him) say: "Whoever slaps his slave, or beats him with a prescribed punishment for an offence he did not commit, its expiation is that he set him free."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النفقات / 15796