It is recommended for the one who swears an oath then sees that something else is better than it; To do that which is better and offer expiation for his oath
وَحَدَّثَنِي الْقَاسِمُ بْنُ زَكَرِيَّاءَ، حَدَّثَنَا خَالِدُ بْنُ مَخْلَدٍ، حَدَّثَنِي سُلَيْمَانُ، - يَعْنِي ابْنَ بِلاَلٍ - حَدَّثَنِي سُهَيْلٌ، فِي هَذَا الإِسْنَادِ بِمَعْنَى حَدِيثِ مَالِكٍ " فَلْيُكَفِّرْ يَمِينَهُ وَلْيَفْعَلِ الَّذِي هُوَ خَيْرٌ " .
This hadith is narrated on the authority of Suhail with the same chain of transmitters (with these words):" He should expiate for (breaking) the vow and do that which is better."