“Whoever frees a slave who has some wealth, the slave's wealth belongs to him, unless the master stipulates that it will belong to him.”
Sunan Ibn Majah Book 19, Hadith 18