It is narrated from Sayyiduna Ma'n (may Allah be pleased with him); he said: My father gave me some charity money and said: "Give it to some man of the mosque." I gave it to someone else. Then I came to my father and told him, and he said: "This is not what I intended." So I took the dispute with him to the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) said: "O Ma'n, what you took is yours." And he said to my father: "O Yazid, what you intended is your reward."
Hadith Referenceالمعجم الكبير للطبراني / باب الياء / 18841