The Prophet ﷺ said, "Whoever comes to own a close relative within the prohibited degrees of kinship, that relative is automatically free."
حدثنا عقبة بن مكرم العمي البصري وغير واحد قالوا حدثنا محمد بن بكر البرساني عن حماد بن سلمة عن قتادة وعاصم الأحول عن الحسن
عن النبي ﷺ قال من ملك ذا رحم محرم فهو حر
[Its chain of transmission is daif]. Abu Dawud narrated it in the Book of Business Transactions, Chapter on Cultivating Land Without the Owner's Permission, hadith no. 3403, from Qutayba with the same chain. Qays bin Rabi also narrated it from Abu Ishaq with the same chain. Sharik used an ambiguous form of transmission (an), Qays is daif, Abu Ishaq used an ambiguous form of transmission (an), and Ataa did not hear from Rafi (Khattabi).