كُنْتُ رَجُلاً مَذَّاءً فَأَمَرْتُ رَجُلاً أَنْ يَسْأَلَ النَّبِيَّ صلى الله عليه وسلم لِمَكَانِ ابْنَتِهِ فَسَأَلَ فَقَالَ " تَوَضَّأْ وَاغْسِلْ ذَكَرَكَ ".
Ali ibn Abi Talib reported: I was a man who frequently had pre-seminal fluid (madhy). So I told a man to ask the Prophet ﷺ, because of (the position of) his daughter. He asked, and he said, “Perform ablution (wudu) and wash your private …
also in Sahih al-Bukhari 132, Sahih al-Bukhari 178