Abu Dawud
Purification (Kitab Al-Taharah)
Book Number: 001 / Hadith Number: 20
Narated By Ibn 'Abbas : The Prophet (pbuh) passed by two graves. He said: Both (the dead) are being punished, but they are not being punished for a major (sin). One did not safeguard himself from urine. The other carried tales. He then called for a fresh twig and split it into two parts and planted one part on each grave and said: Perhaps their punishment may be mitigated as long as the twigs remain fresh.
Another version of Hammad has: "One of them did not cover himself while urinating." The version does not have the words: "He did not safeguard himself from urine."