I said: Do you not fear Allah ? Did you not hear the Messenger of Allah (ﷺ) say: We are not inherited. Whatever we leave is sadaqah (alms). This property belongs to the family of Muhammad for their emergent needs and their guest. When I die, it will go to him who becomes ruler after me.
Sunan Abi Dawud Book 20, Hadith 50