Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) says: Allah Almighty has already decreed four things: the creation of man, his character, his sustenance, and his death. So no one can gain anything from (the share of) another. Giving charity is permissible, whether it has been taken into possession or not.
Hadith Referenceسنن الدارقطني / كتاب الأحباس / 4448