The Messenger of Allah ﷺ said, "Whoever swears an oath and then sees that something else is better than it, let him do what is better and make expiation for his oath." This carries the same meaning as the report of Malik, "Let him make expiation for his oath and do what is better."
و حدثني القاسم بن زكرياء حدثنا خالد بن مخلد حدثني سليمان يعني ابن بلال حدثني سهيل في هذا الإسناد بمعنى حديث مالك فليكفر يمينه وليفعل الذي هو خير