كتاب الإيمان
1  
The Book of Faith
(24)
Chapter: Clarifying that faith decreases because of disobedience and negating it from the one committing the act of disobedience, with the meaning of negating its completion
(24)
باب بَيَانِ نُقْصَانِ الإِيمَانِ بِالْمَعَاصِي وَنَفْيِهِ عَنِ الْمُتَلَبِّسِ بِالْمَعْصِيَةِ عَلَى إِرَادَةِ نَفْيِ كَمَالِهِ
Sahih Muslim 57 f

It is narrated on the authority of Abu Huraira:

A fornicator who fornicates is not a believer as long as he commits fornication, and no one who steals is a believer as long as he commits theft, and no one who drinks wine is a believer as long as he drinks it, and repentance may be accepted after that.
حَدَّثَنِي مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا ابْنُ أَبِي عَدِيٍّ، عَنْ شُعْبَةَ، عَنْ سُلَيْمَانَ، عَنْ ذَكْوَانَ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ يَزْنِي الزَّانِي حِينَ يَزْنِي وَهُوَ مُؤْمِنٌ وَلاَ يَسْرِقُ حِينَ يَسْرِقُ وَهُوَ مُؤْمِنٌ وَلاَ يَشْرَبُ الْخَمْرَ حِينَ يَشْرَبُهَا وَهُوَ مُؤْمِنٌ وَالتَّوْبَةُ مَعْرُوضَةٌ بَعْدُ ‏"‏ ‏.‏
Reference : Sahih Muslim 57f
In-book reference : Book 1, Hadith 114
USC-MSA web (English) reference : Book 1, Hadith 109
  (deprecated numbering scheme)