Abu al-Safar (may Allah have mercy on him) says: I heard Ibn Abbas (may Allah be pleased with them both) saying: "Let me hear what you say, and understand what I say to you. Beware! Do not go out and say, 'Ibn Abbas said.' Any boy whose family took him on Hajj and who then reaches the age of manhood, Hajj is due from him; if he dies (before that), he has fulfilled his Hajj. And any slave whose family took him on Hajj and who is then set free, Hajj is due from him; if he dies (before that), he has fulfilled his Hajj."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9848