Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) narrates that a freed slave of the Messenger of Allah (peace and blessings be upon him) fell from a palm tree (or a date cluster) and died. His inheritance was brought to the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) gave it to his fellow townsman (a man from his locality).
And most likely the actual wording is that he (peace and blessings be upon him) gave his inheritance to a man from among his relatives.