Al-Rabi' bin Sulayman (may Allah have mercy on him) says: I heard Imam al-Shafi'i (may Allah have mercy on him) saying: Whoever swears by one of the names of Allah and then breaks the oath, expiation is due from him, because the name of Allah is not created; but whoever swears by the Ka'bah, or by al-Safa and al-Marwah, no expiation is due from him, because these are created.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الأيمان / 19819