Ata (may Allah have mercy on him) said that Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) was asked about a slave: may he give anything in charity? He said: "Allah sets forth the example of a slave who is owned and has no power over anything" [Surah al-Nahl: 75], meaning he may not give anything in charity, unless he is a herdsman of camels and a man comes to him whose throat has dried up from thirst, and he fears that if he is not given water he will die; then he should give him to drink.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الزكاة / 7862