(46) باب إِذَا رَأَى مَا يَكْرَهُ فَلاَ يُخْبِرْ بِهَا وَلاَ يَذْكُرْهَا
Narrated Abu Salama:
I used to see a dream which would make me sick till I heard Abu Qatada saying, "I too, used to see a dream which would make me sick till I heard the Prophet (ﷺ) saying, "A good dream is from Allah, so if anyone of you saw a dream which he liked, he should not tell it to anybody except to the one whom he loves, and if he saw a dream which he disliked, then he should seek refuge with Allah from its evil and from the evil of Satan, and spit three times (on his left) and should not tell it to anybody, for it will not harm him. "
Reference: Sahih al-Bukhari 7044
In-book reference: Book 91, Hadith 58
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 9, Book 87, Hadith 168