Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) reports this saying of the Prophet (peace and blessings be upon him): "Whoever swears an oath and then sees something else (better than it), let him do it, for that will be its expiation, except for divorce or freeing a slave, which is a different matter."
Imam al-Tabarani recorded it in al-Mu'jam al-Kabir; its chain contains a narrator, Yahya bin Amr bin Malik al-Nukri, whom Hammad bin Zayd accused of lying, and others declared him da'if (weak). Imam al-Daraqutni (may Allah have mercy on him) said: He is suwaylih (somewhat acceptable) and may be considered (for corroboration).