ANSWER:
Both are beneficial.
However, this money now belongs to all his heirs and if all agree to use this for charity on his behalf then no problem, otherwise it must be distributed among his heirs according to sharia law and they can individually give charity on his behalf if they want.