If someone dies that you know or a family member, and you had not asked for forgiveness for any wrong to them will you be forgiven if you pray for that person and ask Allah for forgiveness?
Praise be to Allah, the Lord of the World; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
If you wrongfully take some financial right (i.e. of his private property) of some person, then it is your duty to return such right to his heirs in the most suitable way you can. But, if you cannot because you do not know the heirs, then you pay such money as charity on behalf of that wronged person and you have to pray to Allah to forgive you and him.
Moreover, you are not allowed to give such money as a charity except after making all possible efforts. Then, if you find the heirs, you have to pay the money to them again if they do not sanction your action, i.e. paying as a charity on their behalf.
If you commit some misdeed against some person (e.g. a dead one) such as defamation, cursing or so on, then it is your duty to mention his best qualities and to praise him in front of the same people who listened to your bad words about him before.
We ask Allah to forgive all of us.
Allah knows best.
You can search for fatwa through many choices