Sunan Abi Dawud, Book 12, Hadith 125 (Abu Dawud 2171)

Abu Sa’id reported “The people mentioned about withdrawing the penis before the Prophet (ﷺ). He said “Why one of you does so? He did not say “One of you should not do so”. Every soul that is to be born, Allaah will create it. Abu Dawud said “Qaza’ah is a client of Ziyad”