The Prophet ﷺ said, "Whoever leaves behind wealth, it goes to the heirs, and whoever leaves behind dependents, they are our responsibility." The only difference is that in Ghundar's version it reads, "And whoever leaves behind dependents, I am their guardian."
و حدثنيه أبو بكر بن نافع حدثنا غندر ح و حدثني زهير بن حرب حدثنا عبد الرحمن يعني ابن مهدي قالا حدثنا شعبة بهذا الإسناد غير أن في حديث غندر ومن ترك كلا وليته