Hadith 1019B2

قَالَ يَحْيَى : وَقَالَ مَالِك فِي الرَّجُلِ يَقُولُ : كَفَرَ بِاللَّهِ أَوْ أَشْرَكَ بِاللَّهِ، ثُمَّ يَحْنَثُ : إِنَّهُ لَيْسَ عَلَيْهِ كَفَّارَةٌ، وَلَيْسَ بِكَافِرٍ وَلَا مُشْرِكٍ حَتَّى يَكُونَ قَلْبُهُ مُضْمِرًا عَلَى الشِّرْكِ وَالْكُفْرِ، وَلْيَسْتَغْفِرِ اللَّهَ، وَلَا يَعُدْ إِلَى شَيْءٍ مِنْ ذَلِكَ وَبِئْسَ مَا صَنَعَ
Imam Malik, may Allah have mercy on him, said: If a person says, "If I do this act, then I am a disbeliever or a polytheist," and then he does that act, there will be no expiation upon him, nor will he become a disbeliever or a polytheist unless he holds the belief of polytheism and disbelief in his heart. However, he will be sinful; he should repent and not say such a thing again.
Hadith Reference موطا امام مالك رواية يحييٰ / كتاب النذور والأيمان / 1019B2
Hadith Takhrij «فواد عبدالباقي نمبر: 22 - كِتَابُ النُّذُورِ وَالْأَيْمَانِ-ح: 10»