When his repentance was accepted, Sayyiduna Ka'b bin Malik (may Allah be pleased with him) said to the Messenger of Allah (peace and blessings be upon him): "O Messenger of Allah! I give all my wealth in charity in the way of Allah and His Messenger." The Messenger of Allah (peace and blessings be upon him) said to him: "Keep some of your wealth with you; that is better for you."
Hadith Referenceالمعجم الكبير للطبراني / باب الكاف / 16146