Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrated: The Prophet (peace and blessings be upon him) said: "Whoever swears an oath and then considers something else better than it, its expiation is that he abandons it."
Imam Abu Ya'la recorded it; its chain contains a narrator, Muhammad bin Abd al-Rahman bin al-Baylamani, who is da'if (weak).