Masruq (may Allah have mercy on him) said: I went to Abdullah bin Mas'ud (may Allah be pleased with him) and said: A man had come to stay among us; he went out towards the mountain and died, and he has left three hundred dirhams. Abdullah bin Mas'ud (may Allah be pleased with him) said: Does he have any heir, or does any one of you hold his wala'? I said: No. Abdullah bin Mas'ud (may Allah be pleased with him) said: He has many heirs here. And he put his property into the public treasury (bayt al-mal).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الفرائض / 12404