It was narrated that Hammam heard Abu Hurairah saying that 'Abul-Qasim (ﷺ) said:
"If anyone of you insists on fulfilling what he swore to (after learning that it is wrong) then it is more sinful before Allah than (breaking the oath for which) the expiation that has been enjoined upon him."
English reference: Vol. 3, Book 11, Hadith 2114
Arabic reference: Book 11, Hadith 2192