كتاب الأيمان
27  
The Book of Oaths
(3)
Chapter: 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
(3)
باب نَدْبِ مَنْ حَلَفَ يَمِينًا فَرَأَى غَيْرَهَا خَيْرًا مِنْهَا أَنْ يَأْتِيَ الَّذِي هُوَ خَيْرٌ وَيُكَفِّرَ عَنْ يَمِينِهِ
Sahih Muslim 1650 d

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."
وَحَدَّثَنِي الْقَاسِمُ بْنُ زَكَرِيَّاءَ، حَدَّثَنَا خَالِدُ بْنُ مَخْلَدٍ، حَدَّثَنِي سُلَيْمَانُ، - يَعْنِي ابْنَ بِلاَلٍ - حَدَّثَنِي سُهَيْلٌ، فِي هَذَا الإِسْنَادِ بِمَعْنَى حَدِيثِ مَالِكٍ ‏ "‏ فَلْيُكَفِّرْ يَمِينَهُ وَلْيَفْعَلِ الَّذِي هُوَ خَيْرٌ ‏"‏ ‏.‏
Reference : Sahih Muslim 1650d
In-book reference : Book 27, Hadith 21
USC-MSA web (English) reference : Book 15, Hadith 4055
  (deprecated numbering scheme)