Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: Divorce is only with regard to the iddah (waiting period), and freeing a slave is only valid when done for the pleasure of Allah.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10895