Sayyiduna Ubayy bin Ka'b (may Allah be pleased with him) said: I asked the Prophet (peace and blessings be upon him) about a man who gets some impurity from a woman and then becomes slack (without ejaculating). He (peace and blessings be upon him) said: "He should wash it, then perform ablution and pray."
(b) In another narration, he (peace and blessings be upon him) said: "He should wash his private part and perform ablution."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4132