Jami` at-Tirmidhi, Book 29, Hadith 16 (Tirmidhi 2172)

Aishah narrated that a freed slave of the Prophet (s.a.w) fell from foliage on a date-palm and died. So the Prophet (S.A.W) said:

"See if he has any heirs." They said: "No." He said: 'Pay it to someone among the people of the town."